Title
Distinguishing a primary template
Status
open
Section
13.7.1 [temp.decls.general]
Submitter
Christopher Di Bella

Created on 2023-04-22.00:00:00 last changed 19 months ago

Messages

Date: 2023-04-22.00:00:00

Consider:

  template<class...>
  struct S {};

  template<>
  struct S<> {};

According to 13.7.1 [temp.decls.general] paragraph 2:

A primary template declaration is one in which the name of the template is not followed by a template-argument-list. ...

In the example's template-id, the name of the template S is, in fact not followed by a template-argument-list (it is absent).

Possible resolution:

Change in 13.7.1 [temp.decls.general] paragraph 2

A primary template declaration is one in which the name of the template is not followed by a < template-argument-listopt >. ...
History
Date User Action Args
2023-04-22 00:00:00admincreate