• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2019 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 #endif
9 
10 #include <boost/throw_exception.hpp>
11 #include <cstdlib>
12 
13 class my_exception: public std::exception {};
14 
main()15 int main()
16 {
17     boost::throw_exception( my_exception() );
18     return 1;
19 }
20 
21 namespace boost
22 {
23 
throw_exception(std::exception const &)24 void throw_exception( std::exception const & )
25 {
26     std::exit( 0 );
27 }
28 
29 } // namespace boost
30