[Bug c++/30624] New: ignores explicit qualification
igodard at pacbell dot net
gcc-bugzilla@gcc.gnu.org
Sun Jan 28 19:30:00 GMT 2007
template<typename T> struct foo { T* bar(); };
struct foo1 : public foo<int>, public foo<bool*> { };
int main() { foo1 f; f.bar<int>(); }
gets you:
~/foo$ g++ foo.cc
foo.cc: In function 'int main()':
foo.cc:3: error: request for member 'bar' is ambiguous
foo.cc:1: error: candidates are: T* foo<T>::bar() [with T = bool*]
foo.cc:1: error: T* foo<T>::bar() [with T = int]
foo.cc:3: error: expected primary-expression before 'int'
foo.cc:3: error: expected `;' before 'int'
--
Summary: ignores explicit qualification
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30624
More information about the Gcc-bugs
mailing list