I am writing a C++ header in which I define a
class A { // ... };
that I would like to hide from the outside world (because it may chang
If A is an implementation detail of B, don't put its definition in the header at all. Instead:
class B { ... class A * myA; };
and then put the definition of A in the B implementation (i.e. .cpp) file.