title: Internal typedef and circular dependency
body: <p>I have two classes whose functions take typedefed pointers to eachother as return values and parameters. I.e.:</p>
  
  <pre><code>class Segment;
  
  class Location : public Fwk::NamedInterface {
    public:
      // ===== Class Typedefs =====
      typedef Fwk::Ptr&lt;Location const&gt; PtrConst;
      typedef Fwk::Ptr&lt;Location&gt; Ptr;
      // ===== Class Typedefs End =====
      void segmentIs(Segment::Ptr seg);
      /* ... */
  }
  </code></pre>
  
  <p>and 
      class Location;</p>
  
  <pre><code>class Segment : public Fwk::NamedInterface {
    public:
      // ===== Class Typedefs =====
      typedef Fwk::Ptr&lt;Segment const&gt; PtrConst;
      typedef Fwk::Ptr&lt;Segment&gt; Ptr;
      // ===== Class Typedefs End =====
      void locationIs(Location::Ptr seg);
      /* ... */
   }
  </code></pre>
  
  <p>This understandably generated linker errors...which the forward declarations of the respective classes don't fix. How can I forward declare the <code>Ptr</code> and <code>PtrConst</code> typedefs while keeping these typedefs internal to the class (i.e. I would like to write <code>Location::Ptr</code> to refer to the location pointer type)?</p>
  
  <p>Thanks folks!</p>