I currently have a situation with circular dependencies. I have two classes, let's call them A and B:
#include <classB.h>
class A {
public:
typedef Atype Sometype;
MyReturnValue usefulFunction(B::Btype, ...)
};
And in class B, I have:
class B {
public:
typedef Btype Someothertype;
};
And I need to add a method to B that takes a pointer to A::Atype, such as:
CoolReturnValue doSomething(A::Atype *value, ...)
However, the compiler gives me an error regarding incomplete types. Is there any "easy" way to get something like this to work? Classes A and B are not simple classes. I understand that I could probably get this to work by moving B::Btype and A::Atype into namespaces, and then creating class A and class B within those namespaces; however, that type of change would involve refactoring a codebase of several hundred thousand lines, which I don't have the bandwidth for at this time.