https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10200
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2006-10-21 21:32:49 |2016-1-22 --- Comment #29 from Jonathan Wakely <redi at gcc dot gnu.org> --- You can trick G++ into finishing the parse incorrectly: template<bool> inline void end(int) { } struct S { int end; }; template <typename T> bool both_negative(const T& t, int u) { return t.end < 0 && 0 > (u); } int main() { return both_negative( S{-1}, -2 ); } pe.cc: In instantiation of ‘bool both_negative(const T&, int) [with T = S]’: pe.cc:10:35: required from here pe.cc:6:50: error: ‘end’ is not a member template function bool both_negative(const T& t, int u) { return t.end < 0 && 0 > (u); } ~~^~~~~~~~~~~~~~ I know it isn't, that's why I didn't write "t.template end<" :-)