1 #ifndef BOOST_SERIALIZATION_THROW_EXCEPTION_HPP_INCLUDED
2 #define BOOST_SERIALIZATION_THROW_EXCEPTION_HPP_INCLUDED
3 
4 // MS compatible compilers support #pragma once
5 
6 #if defined(_MSC_VER)
7 # pragma once
8 #endif
9 
10 //  boost/throw_exception.hpp
11 //
12 //  Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
13 //
14 // Distributed under the Boost Software License, Version 1.0. (See
15 // accompanying file LICENSE_1_0.txt or copy at
16 // http://www.boost.org/LICENSE_1_0.txt)
17 
18 #include <boost/config.hpp>
19 
20 #ifndef BOOST_NO_EXCEPTIONS
21 #include <exception>
22 #endif
23 
24 namespace boost {
25 namespace serialization {
26 
27 #ifdef BOOST_NO_EXCEPTIONS
28 
throw_exception(std::exception const & e)29 BOOST_NORETURN inline void throw_exception(std::exception const & e) {
30     ::boost::throw_exception(e);
31 }
32 
33 #else
34 
35 template<class E> BOOST_NORETURN inline void throw_exception(E const & e){
36     throw e;
37 }
38 
39 #endif
40 
41 } // namespace serialization
42 } // namespace boost
43 
44 #endif // #ifndef BOOST_SERIALIZATION_THROW_EXCEPTION_HPP_INCLUDED
45