2002-08-14 12:27:22 +00:00
|
|
|
#ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED
|
|
|
|
#define BOOST_THROW_EXCEPTION_HPP_INCLUDED
|
|
|
|
|
2003-11-28 15:35:21 +00:00
|
|
|
// MS compatible compilers support #pragma once
|
|
|
|
|
2003-06-12 17:09:24 +00:00
|
|
|
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
|
|
|
# pragma once
|
2002-08-14 12:27:22 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//
|
|
|
|
// boost/throw_exception.hpp
|
|
|
|
//
|
|
|
|
// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
|
|
|
|
//
|
2004-07-26 00:32:12 +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-14 12:27:22 +00:00
|
|
|
//
|
2002-11-14 15:13:59 +00:00
|
|
|
// http://www.boost.org/libs/utility/throw_exception.html
|
|
|
|
//
|
2002-08-14 12:27:22 +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-08-04 05:15:01 +00:00
|
|
|
template<class E> inline void throw_exception(E const & e)
|
2002-08-14 12:27:22 +00:00
|
|
|
{
|
|
|
|
throw e;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
} // namespace boost
|
|
|
|
|
|
|
|
#endif // #ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED
|