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

            Bug ID: 83870
           Summary: template parameter pack followed by another template
                    parameter does not error when following parameter can
                    not be deduced
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: smw at gcc dot gnu.org
  Target Milestone: ---

[temp.param]/11 tells us "A template parameter pack of a function template
shall not be followed by another template parameter unless that template
parameter can be deduced from the parameter-type-list of the function template
or has a default argument" and then it goes on to give us a couple of handy
examples.

  // U can be neither deduced from the parameter-type-list nor specified
  template<class... T, class... U> void f() { } // error
  template<class... T, class U> void g() { } // error

  // the above is cut-n-paste from n3690, and for a complete program:
  int
  main()
  {
    f();
  }

MSVC19 and ICC18 issue diagnostics.  GCC8 silently produces an executable.

Reply via email to