In this testcase:
template <class T>
struct A
{
template <class U> void f();
template <class U> void g();
};
template <class T>
struct B
{
A<T> a;
template <class U> void f();
void h()
{
a.f<int>();
a.g<int>();
}
};
we currently accept the call to a.f, but reject the call to a.g. It seems that
we're doing unqualified lookup that finds B::f, and as a result assume that
A::f will also be a template, which is an odd thing to do.
--
Summary: g++ randomly does or doesn't require .template
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jason at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37596