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 2 weeks ago

Messages

Date: 2025-11-06.23:04:52

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 >. ...
Date: 2025-11-06.23:04:52

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).

History
Date User Action Args
2025-11-06 23:04:52adminsetmessages: + msg8318
2023-04-22 00:00:00admincreate