[Bug c++/12131] Argument dependent lookup considered even when it should not

gdr at integrable-solutions dot net gcc-bugzilla@gcc.gnu.org
Tue Sep 2 10:52:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From gdr at integrable-solutions dot net  2003-09-02 10:52 -------
Subject: Re:  New: Argument dependent lookup considered even when it should not

"sylvain dot pion at sophia dot inria dot fr" <gcc-bugzilla@gcc.gnu.org> writes:
| bug_1.C: In function `void g(const T&) [with T = A::C]':
| bug_1.C:20:   instantiated from here
| bug_1.C:15: error: call of overloaded `f(const A::C&)' is ambiguous
| bug_1.C:4: note: candidates are: void A::B::f(const T&) [with T = A::C]
| bug_1.C:9: note:                 void A::f(const T&) [with T = A::C]

This is clearly a bug.

[...]

| template < typename T >
| void g(const T& t)
| {
|   A::B::f(t);
| }

The call to A::B::f should be resolved at the point of definition
because of explicit qualification and certainly ADL doesnot apply.  

-- Gaby



More information about the Gcc-bugs mailing list