This code compiles on MSVC but not on G++ :
template
class B
{
public:
static void SomeMethod()
{
A::SomeMethod();
}
};
class A
{
public:
static void SomeMethod();
};
void test()
{
B::SomeMethod();
}
The error with g++ is :
test.cpp: In static member function "static void B::SomeMethod()":
test.cpp:7:3: error: "A" has not been declared
Is there is a option to indicate to g++ to evaluate the template functions only when a specialization is called, and not before ?