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

            Bug ID: 102410
           Summary: parameter pack expansion twice when there is default
                    parameter during template specialization
           Product: gcc
           Version: 11.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nickhuang99 at hotmail dot com
  Target Milestone: ---

The following code should NOT be accepted because parameter pack should be just
"int*" without "double" which is considered as "Extra". 

template<class...Ts,class Extra, class First=char>
void foo(First, Extra, Ts...){}
template<>
void foo<int*,double>(char,double,int*,double){}


As a contrast, the following code is rejected which is wrong.

template<class...Ts,class Extra, class First=char>
void foo(First, Extra, Ts...){}
template<>
void foo<int*,double>(char,double,int*){}

Reply via email to