This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112c. See for the official list.


2473. Parentheses in pseudo-destructor calls

Section:  []     Status: drafting     Submitter: Mike Miller     Date: 2020-12-15

According to [] paragraph 2,

If the id-expression names a pseudo-destructor, T shall be a scalar type and the id-expression shall appear as the right operand of a class member access ( [expr.ref]) that forms the postfix-expression of a function call ( []).

This would appear to make the following example ill-formed, because it is the parenthesized expression and not the class member access that is the postfix-expression in the function call:

  typedef int T;
  void f(int* p) {
    (p->~T)();   // Ill-formed?

Presumably this is an oversight.