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

            Bug ID: 128986
           Summary: GCC fails to strip const from expanded function
                    parameter types
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: services+gccbugs at vasama dot org
  Target Milestone: ---

template<auto const& Function>
using metafunction = int;

template<typename... Ps>
void f(Ps...);

template<typename... Ps>
void g(Ps const...);

int main()
{
    // ok
    metafunction<f<int>>();

    // error: no matches converting function 'g' to type 'void (&)(int)'
    metafunction<g<int>>();
}

https://godbolt.org/z/eqh4M8bMs

Reply via email to