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