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
8#include <boost/throw_exception.hpp>
9#include <cstdlib>
10
11#if defined(_MSC_VER)
12# pragma warning(disable: 4702) // unreachable code
13#endif
14
15class my_exception: public std::exception {};
16
17int main()
18{
19 boost::throw_exception( e: my_exception() );
20 return 1;
21}
22
23namespace boost
24{
25
26void throw_exception( std::exception const & )
27{
28 std::exit( status: 0 );
29}
30
31} // namespace boost
32

source code of boost/libs/throw_exception/test/throw_exception_no_exceptions_test.cpp