Date
2024-03-15.00:00:00
Message id
7084

Content

[Accepted as a DR at the March, 2024 meeting.]

Subclause 11.4.1 [class.mem.general] has this grammar:

    member-declarator:
        declarator virt-specifier-seq[opt] pure-specifier[opt]
        declarator brace-or-equal-initializer[opt]

    pure-specifier:
        = 0

The primary issue is that foo = 0 matches both member-declarator productions. Secondarily, a declarator by itself is also ambiguous.

Code such as virtual FunctionType f = 0; can be valid, so disambiguation on the syntactic form of the declarator is not possible.