fix doc example typo
[boost.git] / boost / serialization / throw_exception.hpp
blobdad0efe5799022c648a8e5698d0de96cf0a2db6d
1 #ifndef BOOST_SERIALIZATION_THROW_EXCEPTION_HPP_INCLUDED
2 #define BOOST_SERIALIZATION_THROW_EXCEPTION_HPP_INCLUDED
4 // MS compatible compilers support #pragma once
6 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
7 # pragma once
8 #endif
10 // boost/throw_exception.hpp
12 // Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
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)
18 #include <boost/config.hpp>
20 #ifndef BOOST_NO_EXCEPTIONS
21 #include <exception>
22 #endif
24 namespace boost {
25 namespace serialization {
27 #ifdef BOOST_NO_EXCEPTIONS
29 void inline throw_exception(std::exception const & e) {
30 ::boost::throw_exception(e);
33 #else
35 template<class E> inline void throw_exception(E const & e){
36 throw e;
39 #endif
41 } // namespace serialization
42 } // namespace boost
44 #endif // #ifndef BOOST_SERIALIZATION_THROW_EXCEPTION_HPP_INCLUDED