author | William Roberts <williamr@symbian.org> |
Tue, 16 Mar 2010 16:12:26 +0000 | |
branch | Symbian2 |
changeset 2 | 2fe1408b6811 |
permissions | -rw-r--r-- |
williamr@2 | 1 |
#ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED |
williamr@2 | 2 |
#define BOOST_THROW_EXCEPTION_HPP_INCLUDED |
williamr@2 | 3 |
|
williamr@2 | 4 |
// MS compatible compilers support #pragma once |
williamr@2 | 5 |
|
williamr@2 | 6 |
#if defined(_MSC_VER) && (_MSC_VER >= 1020) |
williamr@2 | 7 |
# pragma once |
williamr@2 | 8 |
#endif |
williamr@2 | 9 |
|
williamr@2 | 10 |
// |
williamr@2 | 11 |
// boost/throw_exception.hpp |
williamr@2 | 12 |
// |
williamr@2 | 13 |
// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. |
williamr@2 | 14 |
// |
williamr@2 | 15 |
// Distributed under the Boost Software License, Version 1.0. (See |
williamr@2 | 16 |
// accompanying file LICENSE_1_0.txt or copy at |
williamr@2 | 17 |
// http://www.boost.org/LICENSE_1_0.txt) |
williamr@2 | 18 |
// |
williamr@2 | 19 |
// http://www.boost.org/libs/utility/throw_exception.html |
williamr@2 | 20 |
// |
williamr@2 | 21 |
|
williamr@2 | 22 |
#include <boost/config.hpp> |
williamr@2 | 23 |
|
williamr@2 | 24 |
#ifdef BOOST_NO_EXCEPTIONS |
williamr@2 | 25 |
# include <exception> |
williamr@2 | 26 |
#endif |
williamr@2 | 27 |
|
williamr@2 | 28 |
namespace boost |
williamr@2 | 29 |
{ |
williamr@2 | 30 |
|
williamr@2 | 31 |
#ifdef BOOST_NO_EXCEPTIONS |
williamr@2 | 32 |
|
williamr@2 | 33 |
void throw_exception(std::exception const & e); // user defined |
williamr@2 | 34 |
|
williamr@2 | 35 |
#else |
williamr@2 | 36 |
|
williamr@2 | 37 |
template<class E> inline void throw_exception(E const & e) |
williamr@2 | 38 |
{ |
williamr@2 | 39 |
throw e; |
williamr@2 | 40 |
} |
williamr@2 | 41 |
|
williamr@2 | 42 |
#endif |
williamr@2 | 43 |
|
williamr@2 | 44 |
} // namespace boost |
williamr@2 | 45 |
|
williamr@2 | 46 |
#endif // #ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED |