[Bug c++/83258] Rejecting function pointer non-type template parameter without linkage

herring at lanl dot gov gcc-bugzilla@gcc.gnu.org
Mon Nov 18 23:58:00 GMT 2019


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

S. Davis Herring <herring at lanl dot gov> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |herring at lanl dot gov

--- Comment #5 from S. Davis Herring <herring at lanl dot gov> ---
As an anti-example, making the client a template works:

template<void(*)()> struct A{};

template<int=0>
void f()
{
    constexpr auto fp = +[]{};
    A<fp>{};
}

int main()
{
    f();
}


More information about the Gcc-bugs mailing list