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


2154. Ambiguity of pure-specifier

Section: 11.4  [class.mem]     Status: CD4     Submitter: Richard Smith     Date: 2015-06-30

[Adopted at the February, 2016 meeting.]

There does not appear to be a rule to disambiguate a pure-specifier and a brace-or-equal-initializer in a member declarator.

Proposed resolution (February, 2016):

Add the following as a new paragraph following 11.4 [class.mem] paragraph 3:

[Note: A single name can denote several function members provided their types are sufficiently different (Clause 12 [over]). —end note]

In a member-declarator, an = immediately following the declarator is interpreted as introducing a pure-specifier if the declarator-id has function type, otherwise it is interpreted as introducing a brace-or-equal-initializer. [Example:

  struct S {
    using T = void();
    T * p = 0;        // OK: brace-or-equal-initializer
    virtual T f = 0;  // OK: pure-specifier

end example]