title: Hide implementation by using a pointer (Pimpl idiom)
body: <p>Is it somehow possible, to accomplish the following:</p>
  
  <p><strong>x.hpp</strong> - this file is included by many other classes</p>
  
  <pre><code>class x_impl; //forward declare
  class x {
      public:
          //methods...
      private:
          x_impl* impl_;
  };
  </code></pre>
  
  <p><strong>x.cpp</strong> - the implementation</p>
  
  <pre><code>#include &lt;conrete_x&gt;
  typedef concrete_x x_impl;    //obviously this doesn't work
  //implementation of methods...
  </code></pre>
  
  <p>So basically, I want the users to include the file <strong>x.hpp</strong>, but be unaware of the <strong>conrete_x.hpp</strong> header.</p>
  
  <p>Since I can use <code>concrete_x</code> only by a pointer and it appears only as a private data member, a forward declaration should be enough for the compiler to know how much space to prepare for it. It looks quite like the well-known "pimpl idiom".</p>
  
  <p><strong>Can you help me with this?</strong></p>
  
  <p>PS. I don't want to use a <code>void*</code> and cast it around..</p>