[Bug c++/10200] Weird clash with same names in different scopes
mmitchel at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Apr 5 06:03:00 GMT 2005
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-04-05 06:03 -------
This is almost the same as the case discussed in DR 141.
In particular, we must determine whether "node.foo <" is the start of a
template, or not. [basic.lookup.classref] says that we look in the class of the
object expression, i.e., X<T>::node. However, that's a dependent type. So, we
don't actually try to lookup there. Thus, we then go on to do lookup in the
scope of the containing postfix-expression, which finds the global template
function. DR 141 suggests that we should not do the second lookup. However,
this DR is still in the "open" state; the committee has taken no action as of yet.
However, independently of that, [temp.names] says that when the object has a
dependent type (as it does in this case), then the name is a template only if
the template keyword is explicitly used. So, the compiler is definitely wrong
in this case.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10200
More information about the Gcc-bugs
mailing list