[Bug c++/24795] [4.1 Regression] Error in dependent name-lookup

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Nov 11 15:44:00 GMT 2005



------- Comment #2 from rguenth at gcc dot gnu dot org  2005-11-11 15:44 -------
>From 14.6.2/1 one could argue that foo is a dependent name and thus is looked
up in the context of the point of instantiation, bar, which should find
foo(X::B&).

But 14.6.4/1 contradicts this in telling we search the visible decls from the
point of the template definition and only those from namespaces associated with
the types of the function arguments from the instantiation context and the
definition context.

Which would make the last, working, example a accepts-invalid.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24795



More information about the Gcc-bugs mailing list