[Bug c++/10200] Weird clash with same names in different scopes

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 22 18:21:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10200

--- Comment #28 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Another example:

template<class Tp> inline void end(Tp) { }

template <typename T> bool tnegative(const T& t) { return t.end < 0; }


pe.cc: In function ‘bool tnegative(const T&)’:
pe.cc:3:61: error: parse error in template argument list
 template <typename T> bool tnegative(const T& t) { return t.end < 0; }
                                                             ^~~~~~~


More information about the Gcc-bugs mailing list