This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/43282] New: GCC looks into dependent bases during unqualified lookup
- From: "schaub-johannes at web dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Mar 2010 19:04:57 -0000
- Subject: [Bug c++/43282] New: GCC looks into dependent bases during unqualified lookup
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
GCC does not accept this code, but is supposed to. "foo" is looked up using
unqualified name lookup, during which dependent base classes are ignored. The
fact that "foo" is dependent must not influence this.
template<typename T>
struct HasFoo {
void foo() { }
};
// dependent "HasFoo<T>" should be ignored during
// lookup of "foo"
template<typename T>
struct Bar : HasFoo<T> {
void bar() { foo(T()); }
};
namespace A {
struct Baz { };
void foo(Baz); // should be found!
}
int main() { Bar<A::Baz> b; b.bar(); }
--
Summary: GCC looks into dependent bases during unqualified lookup
Product: gcc
Version: 4.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schaub-johannes at web dot de
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43282