Title
abstract-pack-declarators in type-ids
Status
drafting
Section
9.3.2 [dcl.name]
Submitter
Richard Smith

Created on 2012-03-28.00:00:00 last changed 146 months ago

Messages

Date: 2012-03-28.00:00:00

The grammar for type-id in 11.3 [class.name] paragraph 1 has two problems. First, the fact that we allow an abstract-pack-declarator makes some uses of type-id (template arguments, alignment specifiers, exception-specifications) ambiguous: T... could be parsed either as a type-id, including the ellipsis, or as the type-id T with a following ellipsis. There does not appear to be any rule to disambiguate these parses.

The other problem is that we do not allow parentheses in an abstract-pack-declarator, which makes

  template<typename...Ts> void f(Ts (&...)[4]);

ill-formed because (&...)() is not an abstract-pack-declarator. There is implementation variance on this point.

History
Date User Action Args
2012-11-03 00:00:00adminsetstatus: open -> drafting
2012-03-28 00:00:00admincreate