title: Printing unique_ptr to cout
body: <p>Not able to understand why this is failing?</p>
  
  <pre><code>int *p = new int(10);
  std::unique_ptr&lt;int&gt; ptr(p);
  // Below line gives compilation error.
  std::cout &lt;&lt; "Value of ptr        " &lt;&lt; ptr &lt;&lt; std::endl;
  // Below line works well.
  std::cout &lt;&lt; "Value pointed ptr   " &lt;&lt; *ptr &lt;&lt; std::endl;
  std::cout &lt;&lt; "Value of ptr-&gt;get() " &lt;&lt; ptr.get() &lt;&lt; std::endl;
  </code></pre>
  
  <p>I understand it this way:</p>
  
  <p>Say address of p is 100, address of new allocated memory is 200.</p>
  
  <pre><code>p                new allocated memory
  ----------       ---------
     200              10
  ----------       ---------
  100              200
  
  
  ptr
  ----------
     200
  ----------
  300
  </code></pre>
  
  <p>In above depiction, unique_ptr is pointing to newly allocated memory itself, avoiding 'p'. So, should not printing 'ptr' give me 200?</p>