[Bug c++/43282] GCC looks into dependent bases during unqualified lookup
schaub-johannes at web dot de
gcc-bugzilla@gcc.gnu.org
Mon Mar 8 00:26:00 GMT 2010
------- Comment #4 from schaub-johannes at web dot de 2010-03-08 00:26 -------
Yes, this is the consequence. You have to add "this->" or "Bar::" to use
another form of lookup (qualified or class-member access) or use a
using-declaration to bring the name in scope ("using HasFoo<T>::foo;").
I can't say anything about the intent, but comeau rejects this code, and clang
too (it's actually a well known pit-fall in C++).
See my article here:
http://stackoverflow.com/questions/2396019/c-templates-hides-parent-members/2398186#2398186
.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43282
More information about the Gcc-bugs
mailing list