title: Forward declaration of third party library
body: <p>I am doing a forward declaration of a struct of third party library, so that I can include third party header only in my .cpp file.</p>
  <p>I need to forward declare them in .hpp and then in the .cpp file, I need to let third party header define them in their implementation.</p>
  <pre><code>// X.hpp
  namespace Y {
  typedef struct A A;
  typedef struct B B;
  void (*f1)(A*);
  void (*f2)(B*);
  
  ...
  ...
  
  private: 
  std::unique_ptr&lt;A, decltype(f1)&gt; a;
  std::unique_ptr&lt;B, decltype(f2)&gt; b;
  
  }
  </code></pre>
  <pre><code>// X.cpp
  #include &lt;third_party&gt; // contains definitons and declarations of real A, B
  
  // this is not correct, but I need to say something like this.
  struct Y::A: public A {};
  struct Y::B: public B {};
  
  namespace Y {
  // using A, B in the implementation
  }
  </code></pre>