title: Dereferencing a pointer into a reference in c++
body: <p>In the following code snippet, are there any caveats that need to be considered?</p>
  
  <pre><code>void do_stuff()
  {
      std::unique_ptr&lt;my_type&gt; my(new my());
  
      my_type&amp; mine = *my;
  
      //use mine 
  }
  </code></pre>
  
  <p>It gives me a weird feeling to 'bring out' the value of my by dereferencing the implicit pointer, as it feels like it would create a temporary (but I'm quite sure that's not the case)</p>