title: Hide contents of third-party C++ header file
body: <p>I'm creating a static library in C++ to define a class that others can use in their code.  However, a member of the class is of a type defined in a header file obtained from someone else, and I don't want to distribute the contents of this person's header file.</p>
  
  <p>Here is the current public interface (interface.h):</p>
  
  <pre><code>class B {
      TypeToHide t;
      // other stuff ...  
  };
  
  class A {
      double foo();
      B b;
  };
  </code></pre>
  
  <p>And here is the code that will be compiled into a static library (code.cpp):</p>
  
  <pre><code>double A::foo() {
      // ...
  }
  </code></pre>
  
  <p>And here is the file whose contents I need to hide from public view (HideMe.h):</p>
  
  <pre><code>struct TypeToHide {
      // stuff to hide
  };
  </code></pre>
  
  <p>What can I do hide the contents of HideMe.h?  Ideally, I could just stick the entire struct from HideMe.h into code.cpp.</p>