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

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

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.