This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/43282] GCC looks into dependent bases during unqualified lookup
- From: "bangerth at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Mar 2010 23:41:09 -0000
- Subject: [Bug c++/43282] GCC looks into dependent bases during unqualified lookup
- References: <bug-43282-16474@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from bangerth at gmail dot com 2010-03-07 23:41 -------
The error message I get is this:
g/x> c++ -c x.cc
x.cc: In member function 'void Bar<T>::bar() [with T = A::Baz]':
x.cc:18: instantiated from here
x.cc:10: error: no matching function for call to 'Bar<A::Baz>::foo(A::Baz)'
x.cc:3: note: candidates are: void HasFoo<T>::foo() [with T = A::Baz]
This error message is given upon instantiation time since the call was
(correctly) considered dependent. At instantiation time, gcc finds the
function in the base class but decides that the arguments don't match --
producing the error. Note that the first scope in which a function is
found terminates the search for possible other candidates, even if the
functions in the first scope in which functions are found don't match.
Consequently the code is rejected. Why do you think this
is not the correct behavior?
W.
--
bangerth at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bangerth at gmail dot com
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43282