Boost Exception

clone_exception()

#include <boost/exception/cloning.hpp>

namespace
boost
    {
    template <class T>
    exception_ptr clone_exception( T const & e );
    }

Requirements:

T must be polymorphic.

Returns:

Note:

It is unspecified whether the return values of two successive calls to clone_exception() refer to the same exception object.

See also: