throw_exception_no_both_test.cpp 574 B

12345678910111213141516171819202122232425262728
  1. //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
  2. //Distributed under the Boost Software License, Version 1.0. (See accompanying
  3. //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. #define BOOST_NO_EXCEPTIONS
  5. #define BOOST_EXCEPTION_DISABLE
  6. #include <boost/throw_exception.hpp>
  7. #include <cstdlib>
  8. class my_exception: public std::exception {};
  9. int main()
  10. {
  11. boost::throw_exception( my_exception() );
  12. return 1;
  13. }
  14. namespace boost
  15. {
  16. void throw_exception( std::exception const & )
  17. {
  18. std::exit( 0 );
  19. }
  20. } // namespace boost