]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/throw_exception/test/throw_with_location_nx_test.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / throw_exception / test / throw_with_location_nx_test.cpp
1 // Copyright 2019, 2022 Peter Dimov
2 // Distributed under the Boost Software License, Version 1.0.
3 // http://www.boost.org/LICENSE_1_0.txt
4
5 #if defined(_MSC_VER)
6 # pragma warning(disable: 4702) // unreachable code
7 # pragma warning(disable: 4577) // noexcept used without /EHsc
8 # pragma warning(disable: 4530) // C++ exception handler used
9 #endif
10
11 #include <boost/throw_exception.hpp>
12 #include <cstdlib>
13
14 class my_exception: public std::exception {};
15
16 int main()
17 {
18 boost::throw_with_location( my_exception() );
19 return 1;
20 }
21
22 namespace boost
23 {
24
25 void throw_exception( std::exception const &, boost::source_location const & )
26 {
27 std::exit( 0 );
28 }
29
30 } // namespace boost