20
There are 2 non-template classes A, B having some static template methods.
From class A static method in B is called and from class B static method from A is called. The source code only for illustration (not real code)...
A.h
#include "B.h"
class A
{
public:
template <class T>
void f1 ()
{
T var1= ...;
T var2 = B::f4(T);
}
template <class T>
T f2()
{
return ...
}
};
#include "A.h"
class B
{
public:
template <class T>
void f3 ()
{
T var1= ...;
T var2 = A::f2(T); //Error
}
template <class T>
T f4()
{
return ...
}
};
I am having troubles with g++ compiler in NetBeans. During the compilation the following error occurs: Error: incomplete type A used in nested name specifier, g++.
I tried to add forward declarations into both classes, but nothing was successful.
There is an older bug: