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
Instead of class B holding an A object, have it hold an A* instead (or a shared_ptr, or an unique_ptr, etc.). This way class B only needs a forward declaration of class A and class A can be fully defined inside of class B's source file.
class B
A
A*
shared_ptr
unique_ptr
class A