title: Convert "this" to a reference-to-pointer
body: <p>Let's say I have a struct</p>
  
  <pre><code>struct Foo {
      void bar () {
         do_baz(this);
      }
      /* See edit below
      void do_baz(Foo*&amp; pFoo) {
         pFoo-&gt;p_sub_foo = new Foo; // for example
      }
      */
  
      Foo* p_sub_foo;
  }
  </code></pre>
  
  <p>GCC tells me that</p>
  
  <pre><code>temp.cpp: In member function ‘void Foo::bar()’:
  temp.cpp:3: error: no matching function for call to ‘Foo::do_baz(Foo* const)’
  temp.cpp:5: note: candidates are: void Foo::do_baz(Foo*&amp;)
  </code></pre>
  
  <p>So, how do I convert what is apparently a <code>const Foo*</code> to a <code>Foo*&amp;</code>?</p>
  
  <p><strong>EDIT</strong>: I didn't use a very good example. <code>do_baz</code> should read</p>
  
  <pre><code>void do_baz(Foo*&amp; pFoo) {
      if (pFoo == NULL) {
          pFoo = new Foo;
          return;
      }
      //other stuff
      do_baz(pFoo-&gt;p_sub_foo);
      //more stuff
  }
  </code></pre>