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


2234. Missing rules for simple-template-id as class-name

Section: Clause 11  [class]     Status: CD5     Submitter: Richard Smith     Date: 2016-02-25

[Accepted as a DR at the March, 2018 (Jacksonville) meeting.]

There does not seem to be a rule that prohibits an example like:

  template<typename T> struct X;
  struct X<int> {

Proposed resolution (November, 2017)

Change Clause 11 [class] paragraph 1 as follows:

...A class declaration where the class-name in the class-head-name is a simple-template-id shall be an explicit specialization (13.9.4 [temp.expl.spec]) or a partial specialization (13.7.6 [temp.spec.partial]). A class-specifier whose class-head omits the class-head-name defines an unnamed class. [Note: An unnamed class thus can't be final. —end note]