# Boost Exception

### enable_error_info

#include <boost/exception/enable_error_info.hpp>

    namespace
    boost
        {
        template <class T>
        ---unspecified--- enable_error_info( T const & x );
        }

#### Requirements:

T must be a class with an accessible no-throw copy constructor as per (15.5.1).

#### Returns:

- If T derives from boost::exception, the returned object is of type T and is a copy of x.
- Otherwise, the returned object is of an unspecified type that derives publicly from both T and boost::exception. The T sub-object is initialized from x by the T copy constructor.

#### Throws:

Nothing.

See also: BOOST_THROW_EXCEPTION | Boost Exception | boost/exception/enable_error_info.hpp | Configuration Macros | Frequently Asked Questions | Integrating Boost Exception in Existing Exception Class Hierarchies | throw_exception