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 #ifndef BOOST_EXCEPTION_BC765EB4CA2A11DCBDC5828355D89593 7 #define BOOST_EXCEPTION_BC765EB4CA2A11DCBDC5828355D89593 8 9 #include <boost/exception/exception.hpp> 10 #include <exception> 11 12 namespace 13 boost 14 { 15 namespace 16 exception_test 17 { 18 struct 19 derives_boost_exception: 20 public boost::exception, 21 public std::exception 22 { 23 explicit derives_boost_exception( int x ); 24 virtual ~derives_boost_exception() BOOST_NOEXCEPT_OR_NOTHROW; 25 int x_; 26 }; 27 28 struct 29 derives_boost_exception_virtually: 30 public virtual boost::exception, 31 public std::exception 32 { 33 explicit derives_boost_exception_virtually( int x ); 34 virtual ~derives_boost_exception_virtually() BOOST_NOEXCEPT_OR_NOTHROW; 35 int x_; 36 }; 37 38 struct 39 derives_std_exception: 40 public std::exception 41 { 42 explicit derives_std_exception( int x ); 43 virtual ~derives_std_exception() BOOST_NOEXCEPT_OR_NOTHROW; 44 int x_; 45 }; 46 47 template <class> 48 void throw_test_exception( int ); 49 50 template <> 51 void throw_test_exception<derives_boost_exception>( int ); 52 53 template <> 54 void throw_test_exception<derives_boost_exception_virtually>( int ); 55 56 template <> 57 void throw_test_exception<derives_std_exception>( int ); 58 } 59 } 60 61 #endif 62