title: Universal reference producing different instances with the same address
body: <p>I was experimenting with Universal references inspired by <a href="http://isocpp.org/blog/2012/11/universal-references-in-c11-scott-meyers" rel="nofollow" title="Scott Meyers article on the subject">Scott Meyers article on the subject</a>.</p>
  
  <p>So I tried the following:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cassert&gt;
  
  template&lt;typename T&gt;
  T&amp; f(T&amp;&amp; var){
      std::cout&lt;&lt; &amp;var &lt;&lt; std::endl;
      return var;
  }
  
  int main() {
      int&amp; j = f(10);
      std::cout&lt;&lt; &amp;j &lt;&lt; ", " &lt;&lt; j &lt;&lt; std::endl;
      int&amp; k = f(20);
      std::cout&lt;&lt; &amp;k &lt;&lt; ", " &lt;&lt; k &lt;&lt; std::endl;
  
      if( &amp;j == &amp;k ){
          std::cout&lt;&lt; "This is peculiar." &lt;&lt;std::endl;
      }
  
      return 0;
  }
  </code></pre>
  
  <p>With the output:</p>
  
  <pre><code>0x7ffff8b957ac
  0x7ffff8b957ac, 10
  0x7ffff8b957ac
  0x7ffff8b957ac, 20
  This is peculiar.
  </code></pre>
  
  <p>I was under the impression that <code>&amp;j == &amp;k</code> would guarantee that <code>j==k</code>. </p>
  
  <p>What is happening here?</p>
  
  <p><em>Edit, post answer:</em></p>
  
  <p><em>Anecdotal reflection:
  Outputting j instead of k in the second printout makes the program output nothing at all. I guess I should be happy there were no Chesterfield sofas or whales involved.</em>  </p>