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
16class my_exception: public std::exception {};
17
18int main()
19{
20 boost::throw_exception( e: my_exception() );
21 return 1;
22}
23
24namespace boost
25{
26
27void throw_exception( std::exception const & )
28{
29 std::exit( status: 0 );
30}
31
32} // namespace boost
33

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