Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Click here to view the latest version of this page.

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.