title: Is it possible to declare a nested type alias using a forward declared class in C++11?
body: <p>I'm breaking up a circular include dependency by forward declaring the class in its respective header, however that puts a small wrinkle in the existing convention of using a type alias inside of a class:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;memory&gt;
  
  class C {
   public:
    using Ptr = std::shared_ptr&lt;C&gt;;
  };
  </code></pre>
  
  <p>Ideally it'd be possible to do something like:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;memory&gt;
  
  class C;
  using C::Ptr = std::shared_ptr&lt;C&gt;;
  </code></pre>
  
  <p>But that's not possible because <code>C</code> isn't a complete type (yet). I realize it's possible to create an alias <code>using CPtr = std::shared_ptr&lt;C&gt;;</code>, but I was hoping I was missing something obvious using <code>typename</code> or some other keyword that would establish <code>C</code> as a complete-enough type for the purpose of creating a nested type alias.</p>