[Bug c++/54909] gcc does not recognize member function template when identical named pure virtual method exists
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Oct 12 14:28:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54909
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-10-12 14:28:00 UTC ---
The example can be reduced to
struct A
{
template<class T> void foo() { }
};
struct B : A
{
void foo(int) { }
};
int main(int, char**)
{
B b;
b.foo<int>(); /* error */
}
An alternative to adding a using declaration is to qualify the function you
want:
b.A::foo<int>();
More information about the Gcc-bugs
mailing list