2002-08-20 21:50:08 +00:00
|
|
|
#ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED
|
|
|
|
#define BOOST_THROW_EXCEPTION_HPP_INCLUDED
|
|
|
|
|
2004-02-05 09:14:22 +00:00
|
|
|
// MS compatible compilers support #pragma once
|
|
|
|
|
|
|
|
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
|
|
|
# pragma once
|
2002-08-20 21:50:08 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//
|
|
|
|
// boost/throw_exception.hpp
|
|
|
|
//
|
|
|
|
// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
|
|
|
|
//
|
2004-11-20 09:08:45 +00:00
|
|
|
// Distributed under the Boost Software License, Version 1.0. (See
|
|
|
|
// accompanying file LICENSE_1_0.txt or copy at
|
|
|
|
// http://www.boost.org/LICENSE_1_0.txt)
|
2002-08-20 21:50:08 +00:00
|
|
|
//
|
2003-03-03 15:53:48 +00:00
|
|
|
// http://www.boost.org/libs/utility/throw_exception.html
|
|
|
|
//
|
2002-08-20 21:50:08 +00:00
|
|
|
|
|
|
|
#include <boost/config.hpp>
|
|
|
|
|
|
|
|
#ifdef BOOST_NO_EXCEPTIONS
|
|
|
|
# include <exception>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
namespace boost
|
|
|
|
{
|
|
|
|
|
|
|
|
#ifdef BOOST_NO_EXCEPTIONS
|
|
|
|
|
|
|
|
void throw_exception(std::exception const & e); // user defined
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
2004-11-20 09:08:45 +00:00
|
|
|
template<class E> inline void throw_exception(E const & e)
|
2002-08-20 21:50:08 +00:00
|
|
|
{
|
|
|
|
throw e;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
} // namespace boost
|
|
|
|
|
|
|
|
#endif // #ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED
|