williamr@4: #ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED williamr@4: #define BOOST_THROW_EXCEPTION_HPP_INCLUDED williamr@4: williamr@4: // MS compatible compilers support #pragma once williamr@4: williamr@4: #if defined(_MSC_VER) && (_MSC_VER >= 1020) williamr@4: # pragma once williamr@4: #endif williamr@4: williamr@4: // williamr@4: // boost/throw_exception.hpp williamr@4: // williamr@4: // Copyright (c) 2002 Peter Dimov and Multi Media Ltd. williamr@4: // williamr@4: // Distributed under the Boost Software License, Version 1.0. (See williamr@4: // accompanying file LICENSE_1_0.txt or copy at williamr@4: // http://www.boost.org/LICENSE_1_0.txt) williamr@4: // williamr@4: // http://www.boost.org/libs/utility/throw_exception.html williamr@4: // williamr@4: williamr@4: #include williamr@4: williamr@4: #ifdef BOOST_NO_EXCEPTIONS williamr@4: # include williamr@4: #endif williamr@4: williamr@4: namespace boost williamr@4: { williamr@4: williamr@4: #ifdef BOOST_NO_EXCEPTIONS williamr@4: williamr@4: void throw_exception(std::exception const & e); // user defined williamr@4: williamr@4: #else williamr@4: williamr@4: template inline void throw_exception(E const & e) williamr@4: { williamr@4: //Adding this #if statement for WINSCW because currently winscw compiler does not support catching of const exception by non const catch blocks williamr@4: //Once compiler starts supporting, this #if statement needs to be removed williamr@4: #if ( defined __WINSCW__) williamr@4: E a = e; williamr@4: throw a; williamr@4: #else williamr@4: throw e; williamr@4: #endif williamr@4: } williamr@4: williamr@4: #endif williamr@4: williamr@4: } // namespace boost williamr@4: williamr@4: #endif // #ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED