title: C++ smart pointers address
body: <p>I am a little confused with smart pointers. In the following code, should the &amp; operator return the adress of the smart pointer allocation or the address of the pointer it's controlling?</p>
  
  <pre><code>main() {
      std::shared_ptr&lt;int&gt; i = std::shared_ptr&lt;int&gt;(new int(1));
      std::shared_ptr&lt;int&gt; j = i;
      printf("(%p, %p)\n", &amp;i, &amp;j);
  }
  </code></pre>
  
  <p>Running the code, I got different address. If I run an equivalent code with raw pointers, I get the same adress:</p>
  
  <pre><code>main() {
      int e = 1;
      int *k = &amp;e;
      int *l = k;
  
      printf("(%p, %p)\n",k,l);
  }
  </code></pre>