catching exception objects by reference, temporaries, lifetime issues
<p>Consider the following code:</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;stdexcept&gt;

void foo()
{
    throw std::runtime_error("How long do I live?");
}

int main()
{
    try
    {
        foo();
    }
    catch (std::runtime_error&amp; e)
    {
        std::cout &lt;&lt; e.what() &lt;&lt; std::endl;
    }
}
</code></pre>

<p>Why can I catch the exception by reference, isn't <code>std::runtime_error("How long do I live?")</code> an rvalue?</p>

<p>How come the exception object is still alive in the catch block?</p>

<p>Where exactly are thrown exception objects stored? What is their lifetime?</p>
