[Bug c++/102235] New: array not decay to pointer for template function parameter during specialization with parameter pack as template argument

nickhuang99 at hotmail dot com gcc-bugzilla@gcc.gnu.org
Tue Sep 7 22:51:10 GMT 2021


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

            Bug ID: 102235
           Summary: array not decay to pointer for template function
                    parameter during specialization with parameter pack as
                    template argument
           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: ---

Consider this snippet with error of no matches of specialization, it is similar
to case PR94501 which happens during implicit conversion. However, the internal
implementation of them might be very different. So, I would rather file this as
a new bug instead of duplicate. The direct reason is that fixing this bug might
not fix this PR94501.


template<typename ...Ts>
void foo(Ts...);
template<>
void foo<int[]>(int*){}


parameter.cpp:4:6: error: template-id ‘foo<int []>’ for ‘void foo(int*)’ does
not match any template declaration
 void foo<int[]>(int*){}
      ^~~~~~~~~~
parameter.cpp:2:6: note: candidate is: template<class ... Ts> void foo(Ts ...)
 void foo(Ts...);
      ^~~


More information about the Gcc-bugs mailing list