helper2.hpp 1.7 KB

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