1 | //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. |
2 | |
3 | //Distributed under the Boost Software License, Version 1.0. (See accompanying |
4 | //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
5 | |
6 | #define BOOST_NO_EXCEPTIONS |
7 | #define BOOST_EXCEPTION_DISABLE |
8 | |
9 | #include <boost/throw_exception.hpp> |
10 | #include <cstdlib> |
11 | |
12 | #if defined(_MSC_VER) |
13 | # pragma warning(disable: 4702) // unreachable code |
14 | #endif |
15 | |
16 | class my_exception: public std::exception {}; |
17 | |
18 | int main() |
19 | { |
20 | boost::throw_exception( e: my_exception() ); |
21 | return 1; |
22 | } |
23 | |
24 | namespace boost |
25 | { |
26 | |
27 | void throw_exception( std::exception const & ) |
28 | { |
29 | std::exit( status: 0 ); |
30 | } |
31 | |
32 | } // namespace boost |
33 | |