Title
Ambiguity of pure-specifier
Status
cd4
Section
11.4 [class.mem]
Submitter
Richard Smith

Created on 2015-06-30.00:00:00 last changed 49 months ago

Messages

Date: 2016-02-15.00:00:00

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 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]

Date: 2016-02-15.00:00:00

[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.

History
Date User Action Args
2017-02-06 00:00:00adminsetstatus: tentatively ready -> cd4
2016-02-15 00:00:00adminsetmessages: + msg5706
2016-02-15 00:00:00adminsetstatus: drafting -> tentatively ready
2015-06-30 00:00:00admincreate