title: Hiding a C++ class in a header without using the unnamed namespace
body: <p>I am writing a C++ header in which I define a</p>
  
  <pre><code>class A {
     // ...
  };
  </code></pre>
  
  <p>that I would like to hide from the outside world (because it may change or even be removed in future versions of this header). </p>
  
  <p>There is also a class B in the same header that has an object of class A as a member:</p>
  
  <pre><code>class B {
  public:
     // ...
  
  private:
     A a_;
  };
  </code></pre>
  
  <p>What is a proper way of hiding class A from the outside world?</p>
  
  <p>If I put the definition of A in an unnamed namespace, the compiler issues a warning, so I assume that, due to issues with internal linkage, I should do something else.</p>