What happens when passing reference to literal in C++?
<p>What happens here:</p>

<pre><code>double foo( const double&amp; x ) {
   // do stuff with x
}

foo( 5.0 );
</code></pre>

<ol>
<li>Does the compiler create an anonymous variable and sets its value to 5.0?</li>
<li>Does the x reference a memory location in read-only memory? This is a weird phrasing, I know...</li>
</ol>

<p><strong>edit</strong>: I forgot the const keyword...</p>
