How can I make a forward declaration of a class that is defined in some
other namespace? E.g.:
file1.h:
namespace A {
class A {...};
}
file2.h:
class A::A; //error: A is not a namespace
class B {
A* a;
};
The only way I found is to include file1.h in file2.h. But in that case
I don't need a forward declaration of A anymore, because I lose the
compilation "independence" anyway.