<div><ul><li> An <spanclass="RenoLink"><ahref="exception_ptr.html">exception_ptr</a></span> that refers to the currently handled exception or a copy of the currently handled exception.</li>
<li> If the function needs to allocate memory and the attempt fails, it returns an <spanclass="RenoLink"><ahref="exception_ptr.html">exception_ptr</a></span> that refers to an instance of std::bad_alloc.</li>
<div><ul><li> It is unspecified whether the return values of two successive calls to <spanclass="RenoLink">current_exception</span> refer to the same exception object.</li>
<li> Correct implementation of <spanclass="RenoLink">current_exception</span> may require compiler support, unless <spanclass="RenoLink"><ahref="enable_current_exception.html">enable_current_exception</a></span> was used at the time the currently handled exception object was passed to throw. If <spanclass="RenoLink"><ahref="enable_current_exception.html">enable_current_exception</a></span> was not used, and if the compiler does not provide the necessary support, then <spanclass="RenoLink">current_exception</span> may return an <spanclass="RenoLink"><ahref="exception_ptr.html">exception_ptr</a></span> that refers to an instance of <spanclass="RenoLink"><ahref="unknown_exception.html">unknown_exception</a></span>. In this case, if the original exception object derives from boost::<spanclass="RenoLink"><ahref="exception.html">exception</a></span>, then the boost::<spanclass="RenoLink"><ahref="exception.html">exception</a></span> sub-object of the <spanclass="RenoLink"><ahref="unknown_exception.html">unknown_exception</a></span> object is initialized by the boost::<spanclass="RenoLink"><ahref="exception.html">exception</a></span> copy constructor.</li>