/Src/Dependencies/Boost/boost/variant/bad_visit.hpp

http://hadesmem.googlecode.com/ · C++ Header · 41 lines · 16 code · 8 blank · 17 comment · 0 complexity · a4c9e524af79eab6fd9069ed9fe911f8 MD5 · raw file

  1. //-----------------------------------------------------------------------------
  2. // boost variant/bad_visit.hpp header file
  3. // See http://www.boost.org for updates, documentation, and revision history.
  4. //-----------------------------------------------------------------------------
  5. //
  6. // Copyright (c) 2002-2003
  7. // Eric Friedman
  8. //
  9. // Distributed under the Boost Software License, Version 1.0. (See
  10. // accompanying file LICENSE_1_0.txt or copy at
  11. // http://www.boost.org/LICENSE_1_0.txt)
  12. #ifndef BOOST_VARIANT_BAD_VISIT_HPP
  13. #define BOOST_VARIANT_BAD_VISIT_HPP
  14. #include <exception>
  15. namespace boost {
  16. //////////////////////////////////////////////////////////////////////////
  17. // class bad_visit
  18. //
  19. // Exception thrown when a visitation attempt via apply_visitor fails due
  20. // to invalid visited subtype or contents.
  21. //
  22. struct bad_visit
  23. : std::exception
  24. {
  25. public: // std::exception interface
  26. virtual const char * what() const throw()
  27. {
  28. return "boost::bad_visit: "
  29. "failed visitation using boost::apply_visitor";
  30. }
  31. };
  32. } // namespace boost
  33. #endif // BOOST_VARIANT_BAD_VISIT_HPP