https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57712
Stan Shebs <stanshebs at earthlink dot net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stanshebs at earthlink dot net --- Comment #1 from Stan Shebs <stanshebs at earthlink dot net> --- This bug seems to have manifested itself at Google in the following form: struct S { template<typename B> int g(B b); template<typename B> auto h(B b) -> decltype(g(b)); }; template<typename B> auto S::h(B b) -> decltype(g(b)) { return g(b); } Clang likes it fine, but it still occurs for a couple-weeks-ago GCC: tre.cc:5:27: error: prototype for ‘decltype (((S*)this)->S::g(b)) S::h(B)’ does not match any in class ‘S’ template<typename B> auto S::h(B b) -> decltype(g(b)) { return g(b); } ^ tre.cc:3:31: error: candidate is: template<class B> decltype (((S*)this)->S::g(b)) S::h(B) template<typename B> auto h(B b) -> decltype(g(b));