title: Will a reference bound to a function parameter prolong the lifetime of that temporary?
body: <p>I have this code (simplified version):</p>
  
  <pre><code>const int&amp; function( const int&amp; param )
  {
       return param;
  }
  
  const int&amp; reference = function( 10 );
  //use reference
  </code></pre>
  
  <p>I can't quite decide to which extent C++03 Standard $12.2/5 wording</p>
  
  <blockquote>
    <p>The temporary to which the reference is bound or the temporary that is the complete object to a subobject of which the temporary is bound persists for the lifetime of the reference...</p>
  </blockquote>
  
  <p>is applicable here.</p>
  
  <p>Is <code>reference</code> variable in the code above valid or dangling? Will the reference in the calling code prolong the lifetime of the temporary passed as the parameter?</p>