assignment_exception.hpp 977 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Boost.Assign library
  2. //
  3. // Copyright Thorsten Ottosen 2003-2004. Use, modification and
  4. // distribution is subject to the Boost Software License, Version
  5. // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8. // For more information, see http://www.boost.org/libs/assign/
  9. //
  10. #ifndef BOOST_ASSIGN_ASSIGNMENT_EXCEPTION_HPP
  11. #define BOOST_ASSIGN_ASSIGNMENT_EXCEPTION_HPP
  12. #include <boost/config.hpp>
  13. #include <exception>
  14. #if defined(BOOST_HAS_PRAGMA_ONCE)
  15. # pragma once
  16. #endif
  17. namespace boost
  18. {
  19. namespace assign
  20. {
  21. class assignment_exception : public std::exception
  22. {
  23. public:
  24. assignment_exception( const char* _what )
  25. : what_( _what )
  26. { }
  27. virtual const char* what() const BOOST_NOEXCEPT_OR_NOTHROW
  28. {
  29. return what_;
  30. }
  31. private:
  32. const char* what_;
  33. };
  34. }
  35. }
  36. #endif