---unspecified--- <spanclass="RenoLink"><ahref="enable_current_exception.html">enable_current_exception</a></span>( T const & e );</span>
}</pre>
</div><h4>Requirements:</h4>
<p><tt>T</tt> must have an accessible no-throw copy constructor</p>
<h4>Returns:</h4>
<p>An object of <i>unspecified</i> type which derives publicly from <tt>T</tt>. That is, the returned object can be intercepted by a <tt>catch(T &)</tt>.</p>
<h4>Description:</h4>
<p>This function is designed to be used directly in a throw-expression to enable the cloning support in Boost Exception. For example:</p>
<p>Unless <tt><spanclass="RenoLink"><ahref="enable_current_exception.html">enable_current_exception</a></span>()</tt> is called at the time an exception object is used in a throw-expression, an attempt to copy it using <tt><spanclass="RenoLink"><ahref="current_exception.html">current_exception</a></span>()</tt> may return an <tt><spanclass="RenoLink"><ahref="exception_ptr.html">exception_ptr</a></span></tt> which refers to an instance of <tt><spanclass="RenoLink"><ahref="unknown_exception.html">unknown_exception</a></span></tt>. See <tt><spanclass="RenoLink"><ahref="current_exception.html">current_exception</a></span>()</tt> for details.</p>
<p>Instead of using the <tt>throw</tt> keyword directly, it is preferable to call <tt>boost::<spanclass="RenoLink"><ahref="throw_exception.html">throw_exception</a></span>()</tt>. This is guaranteed to throw an exception that derives from <tt>boost::<spanclass="RenoLink"><ahref="exception.html">exception</a></span></tt> and supports cloning.</p>