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