1 // (C) Copyright Beman Dawes 2009
3 // Use, modification and distribution are subject to the
4 // Boost Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 // See http://www.boost.org/libs/config for more information.
9 // MACRO: BOOST_NO_CXX11_HDR_EXCEPTION
10 // TITLE: C++11 header <exception> not compatible
11 // DESCRIPTION: The standard library does not provide a C++11 compatible version of <exception>.
15 namespace boost_no_cxx11_hdr_exception {
19 #ifdef BOOST_NO_EXCEPTIONS
20 using std::exception_ptr;
21 using std::current_exception;
22 using std::rethrow_exception;
25 std::exception_ptr ep;
32 ep = std::current_exception();
36 std::rethrow_exception(ep);
40 // return zero on success
41 return i == 42 ? 0 : 1;