• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
13 #ifndef BOOST_VARIANT_BAD_VISIT_HPP
14 #define BOOST_VARIANT_BAD_VISIT_HPP
15 
16 #include <boost/config.hpp>
17 
18 #include <exception>
19 
20 namespace boost {
21 
22 //////////////////////////////////////////////////////////////////////////
23 // class bad_visit
24 //
25 // Exception thrown when a visitation attempt via apply_visitor fails due
26 // to invalid visited subtype or contents.
27 //
28 struct BOOST_SYMBOL_VISIBLE bad_visit
29     : std::exception
30 {
31 public: // std::exception interface
32 
whatboost::bad_visit33     const char * what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE
34     {
35         return "boost::bad_visit: "
36                "failed visitation using boost::apply_visitor";
37     }
38 
39 };
40 
41 } // namespace boost
42 
43 #endif // BOOST_VARIANT_BAD_VISIT_HPP
44