https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10118
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |101603 Last reconfirmed|2005-12-11 23:07:23 |2021-7-23 --- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> --- We get now: <source>:7:26: error: 'void (B::*)(){((void (B::*)())A::foo), 0}' is not a valid template argument for type 'void (B::*)()' 7 | CT<B, (B_ptr) &A::foo> c; | ^ <source>:7:26: note: it must be a pointer-to-member of the form '&X::Y' ASM generation compiler returned: 1 <source>:7:26: error: 'void (B::*)(){((void (B::*)())A::foo), 0}' is not a valid template argument for type 'void (B::*)()' 7 | CT<B, (B_ptr) &A::foo> c; | ^ <source>:7:26: note: it must be a pointer-to-member of the form '&X::Y' Execution build compiler returned: 1 While clang produces: <source>:7:11: error: non-type template argument is not a pointer to member constant CT<B, (B_ptr) &A::foo> c; ^~~~~~~~~~~~~~~ 1 error generated. ASM generation compiler returned: 1 <source>:7:11: error: non-type template argument is not a pointer to member constant CT<B, (B_ptr) &A::foo> c; ^~~~~~~~~~~~~~~ Both are not obvious but gcc is still worse as it has the "{((void (B::*)())A::foo), 0}" part there still. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101603 [Bug 101603] [meta-bug] pointer to member functions issues