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

2026-07-26


3213. Restrictions on the template-head of a concept definition

Section: 13.2  [temp.param]     Status: open     Submitter: Corentin Jabot     Date: 2026-07-20

(From submission #951.)

Consider:

  template <typename T, typename U = int, typename V>
  concept C = true;

  template <typename T = int>
  concept C2 = true;
  static_assert(C2<>);

  template <typename... T, typename... U>
  concept C3 = true;

  template <typename... T, typename U = int>
  concept C4 = true;

  template <typename... T, typename U>
  concept C5 = true;

None of these examples should be valid. There is implementation divergence.

Suggested resolution:

  1. Change in 13.2 [temp.param] paragraph 19 as follows:

    If a template-parameter of a class template, variable template, concept, or alias template has a default template argument, each subsequent template-parameter shall either have a default template argument supplied or declare a template parameter pack. If a template-parameter of a primary class template, primary variable template, concept, or alias template declares a template parameter pack, it shall be the last template-parameter. If a template-parameter of a function template declares a template parameter pack, it shall not be followed by another template-parameter unless that template parameter is deducible from the parameter-type-list (9.3.4.6 [dcl.fct]) of the function template or has a default argument (13.10.3 [temp.deduct]). A template parameter of a deduction guide template (13.7.2.3 [temp.deduct.guide]) that does not have a default argument shall be deducible from the parameter-type-list of the deduction guide template.
  2. Change in 13.7.9 [temp.concept] as follows:

    The first declared template parameter of a concept definition is its prototype parameter. It shall not have a default argument (13.2 [temp.param]). A type concept is a concept whose prototype parameter is a type template parameter.