https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85011
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|diagnostic |rejects-valid --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- clang says t.C:5:33: error: return type of out-of-line definition of 'foo::f1' differs from that in the declaration template <class T> auto foo<T>::f1() -> decltype ((this)->foo<T>::x) {} ^ t.C:3:8: note: previous declaration is here auto f1() -> decltype(x); ^ 1 error generated. so I'm not sure the standard says they are the same