https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96218

            Bug ID: 96218
           Summary: DR 2032: Default template-arguments of variable
                    templates
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

// DR 2032 - Default template-arguments of variable templates

// [temp.param]/14: If a template-parameter of a class template, variable
// template, or alias template has a default template-argument, each subsequent
// template-parameter shall either have a default template-argument supplied or
// be a template parameter pack.
template<typename T = int, typename U> // error
T vt;

// [temp.param]/14: If a template-parameter of a primary class template,
// primary variable template, or alias template is a template parameter pack,
// it shall be the last template-parameter.
template<typename... Ts, typename U> // error
int vt2;

Here we should give two errors under DR 2032, but we only give the first one.

Reply via email to