]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/exception/test/4-throw_exception_no_both_test.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / exception / test / 4-throw_exception_no_both_test.cpp
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_EXCEPTION_DISABLE
7
8 #include <boost/config.hpp>
9
10 #if !defined( BOOST_NO_EXCEPTIONS )
11 # error This program requires exception handling disabled.
12 #endif
13
14 #include <boost/throw_exception.hpp>
15 #include <stdlib.h>
16
17 class my_exception: public std::exception { };
18
19 namespace
20 boost
21 {
22 void
23 throw_exception( std::exception const & )
24 {
25 exit(0);
26 }
27 }
28
29 int
30 main()
31 {
32 boost::throw_exception(my_exception());
33 return 1;
34 }