This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-12-19


2951. Distinguishing a primary template

Section: 13.7.1  [temp.decls.general]     Status: open     Submitter: Christopher Di Bella     Date: 2023-04-22

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