https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102721
--- Comment #4 from qingzhe huang <nickhuang99 at hotmail dot com> --- (In reply to Andrew Pinski from comment #2) > Note it is not array related either: > template<> > void A<decltype(+[]{})>::foo(const decltype(+[]{})) > {} Yes, it is not array-related. But it is definitely member function issue with out-of line definition. See this works fine: template<class T> void foo(const T){} template<> void foo<decltype(+[]{})>(const decltype(+[]{})); //declaration template<> void foo<decltype(+[]{})>(const decltype(+[]{})) {}