Title
template in elaborated-type-specifier without nested-name-specifier
Status
c++14
Section
9.2.9.4 [dcl.type.elab]
Submitter
Richard Smith

Created on 2013-06-27.00:00:00 last changed 81 months ago

Messages

Date: 2014-02-15.00:00:00

[Moved to DR at the February, 2014 meeting.]

Date: 2014-01-15.00:00:00

Proposed resolution (January, 2014):

Change the grammar in 9.2.9.4 [dcl.type.elab] as follows:

    elaborated-type-specifier:
      class-key attribute-specifier-seqopt nested-name-specifieropt identifier
      class-key simple-template-id
      class-key nested-name-specifieropt templateopt simple-template-id
      enum nested-name-specifieropt identifier
Date: 2013-06-27.00:00:00

The grammar for elaborated-type-specifier in 9.2.9.4 [dcl.type.elab] reads, in part,

    elaborated-type-specifier:
      class-key nested-name-specifieropt templateopt simple-template-id

This allows use of the template keyword without a nested-name-specifier, e.g., struct template S<int>. This is inconsistent with other uses of the template keyword. It might be better to split the production in two and only allow the keyword following a nested-name-specifier, i.e.,

    elaborated-type-specifier:
      class-key simple-template-id
      class-key nested-name-specifier templateopt simple-template-id
History
Date User Action Args
2014-11-24 00:00:00adminsetstatus: dr -> c++14
2014-03-03 00:00:00adminsetmessages: + msg4947
2014-03-03 00:00:00adminsetstatus: tentatively ready -> dr
2014-01-20 00:00:00adminsetmessages: + msg4727
2014-01-20 00:00:00adminsetstatus: drafting -> tentatively ready
2013-10-14 00:00:00adminsetstatus: open -> drafting
2013-06-27 00:00:00admincreate