...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
#include <boost/throw_exception.hpp>
namespace
boost
{
#ifdef BOOST_NO_EXCEPTIONS
void throw_exception( std::exception const & e ); // user defined
#else
template <class E>
void throw_exception( E const & e );
#endif
}
E must derive publicly from std::exception.