sl@0: //----------------------------------------------------------------------------- sl@0: // boost variant/bad_visit.hpp header file sl@0: // See http://www.boost.org for updates, documentation, and revision history. sl@0: //----------------------------------------------------------------------------- sl@0: // sl@0: // Copyright (c) 2002-2003 sl@0: // Eric Friedman sl@0: // sl@0: // Distributed under the Boost Software License, Version 1.0. (See sl@0: // accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: sl@0: #ifndef BOOST_VARIANT_BAD_VISIT_HPP sl@0: #define BOOST_VARIANT_BAD_VISIT_HPP sl@0: sl@0: #include sl@0: sl@0: namespace boost { sl@0: sl@0: ////////////////////////////////////////////////////////////////////////// sl@0: // class bad_visit sl@0: // sl@0: // Exception thrown when a visitation attempt via apply_visitor fails due sl@0: // to invalid visited subtype or contents. sl@0: // sl@0: struct bad_visit sl@0: : std::exception sl@0: { sl@0: public: // std::exception interface sl@0: sl@0: virtual const char * what() const throw() sl@0: { sl@0: return "boost::bad_visit: " sl@0: "failed visitation using boost::apply_visitor"; sl@0: } sl@0: sl@0: }; sl@0: sl@0: } // namespace boost sl@0: sl@0: #endif // BOOST_VARIANT_BAD_VISIT_HPP