https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85011
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2018-03-28 CC| |msebor at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- I'll confirm this as rejects-valid. I didn't take the time to look it up in the standard but since the non-template case below is accepted I would expect the template case to be as well. It doesn't appear to be a regression. struct foo { int x; auto f1() -> decltype (x); }; auto foo::f1() -> decltype (this->x) {}