mirror of
https://github.com/boostorg/spirit.git
synced 2026-01-19 04:42:11 +00:00
Prepare for C++20 and remove "throw()" usage.
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
# undef NDEBUG
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <stdexcept>
|
||||
|
||||
#define BOOST_SPIRIT_ASSERT_EXCEPTION ::spirit_exception
|
||||
@@ -23,9 +24,9 @@ struct spirit_exception : std::exception
|
||||
: message(msg)
|
||||
{
|
||||
}
|
||||
~spirit_exception() throw() {}
|
||||
~spirit_exception() BOOST_NOEXCEPT_OR_NOTHROW {}
|
||||
|
||||
char const* what() const throw() { return message; }
|
||||
char const* what() const BOOST_NOEXCEPT_OR_NOTHROW { return message; }
|
||||
|
||||
char const * message;
|
||||
};
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/spirit/home/support/info.hpp>
|
||||
#include <boost/spirit/include/support_line_pos_iterator.hpp>
|
||||
|
||||
@@ -74,9 +75,9 @@ struct expected_component : std::exception
|
||||
msg = oss.str();
|
||||
}
|
||||
|
||||
virtual ~expected_component() throw() {}
|
||||
virtual ~expected_component() BOOST_NOEXCEPT_OR_NOTHROW {}
|
||||
|
||||
virtual char const* what() const throw()
|
||||
virtual char const* what() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
return msg.c_str();
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
|
||||
protected:
|
||||
|
||||
parser_error_base() {}
|
||||
virtual ~parser_error_base() throw() {}
|
||||
virtual ~parser_error_base() BOOST_NOEXCEPT_OR_NOTHROW {}
|
||||
|
||||
public:
|
||||
|
||||
@@ -87,10 +87,10 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
|
||||
}
|
||||
|
||||
virtual
|
||||
~parser_error() throw() {}
|
||||
~parser_error() BOOST_NOEXCEPT_OR_NOTHROW {}
|
||||
|
||||
virtual const char*
|
||||
what() const throw()
|
||||
what() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
return "BOOST_SPIRIT_CLASSIC_NS::parser_error";
|
||||
}
|
||||
|
||||
@@ -150,11 +150,11 @@ class BOOST_SYMBOL_VISIBLE illegal_backtracking : public std::exception
|
||||
{
|
||||
public:
|
||||
|
||||
illegal_backtracking() throw() {}
|
||||
~illegal_backtracking() throw() {}
|
||||
illegal_backtracking() BOOST_NOEXCEPT_OR_NOTHROW {}
|
||||
~illegal_backtracking() BOOST_NOEXCEPT_OR_NOTHROW {}
|
||||
|
||||
virtual const char*
|
||||
what() const throw()
|
||||
what() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return "BOOST_SPIRIT_CLASSIC_NS::illegal_backtracking"; }
|
||||
};
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace boost { namespace spirit { namespace qi {
|
||||
: std::runtime_error("boost::spirit::qi::expectation_failure")
|
||||
, first(first_), last(last_), what_(what)
|
||||
{}
|
||||
~expectation_failure() throw() {}
|
||||
~expectation_failure() BOOST_NOEXCEPT_OR_NOTHROW {}
|
||||
|
||||
Iterator first;
|
||||
Iterator last;
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace boost { namespace spirit
|
||||
: from(src.name()), to(dest.name())
|
||||
{}
|
||||
|
||||
virtual const char* what() const throw() { return "bad any cast"; }
|
||||
virtual const char* what() const BOOST_NOEXCEPT_OR_NOTHROW { return "bad any cast"; }
|
||||
|
||||
const char* from;
|
||||
const char* to;
|
||||
|
||||
@@ -23,10 +23,10 @@ namespace boost { namespace spirit { namespace iterator_policies
|
||||
class BOOST_SYMBOL_VISIBLE illegal_backtracking : public std::exception
|
||||
{
|
||||
public:
|
||||
illegal_backtracking() throw() {}
|
||||
~illegal_backtracking() throw() {}
|
||||
illegal_backtracking() BOOST_NOEXCEPT_OR_NOTHROW {}
|
||||
~illegal_backtracking() BOOST_NOEXCEPT_OR_NOTHROW {}
|
||||
|
||||
char const* what() const throw()
|
||||
char const* what() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
return "boost::spirit::multi_pass::illegal_backtracking";
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/utility/result_of.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#include <boost/spirit/home/support/utree/detail/utree_detail1.hpp>
|
||||
|
||||
@@ -143,9 +144,9 @@ namespace boost { namespace spirit
|
||||
msg = oss.str();
|
||||
}
|
||||
|
||||
virtual ~bad_type_exception() throw() {}
|
||||
virtual ~bad_type_exception() BOOST_NOEXCEPT_OR_NOTHROW {}
|
||||
|
||||
virtual char const* what() const throw()
|
||||
virtual char const* what() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return msg.c_str(); }
|
||||
};
|
||||
|
||||
@@ -155,9 +156,9 @@ namespace boost { namespace spirit
|
||||
|
||||
empty_exception(char const* error) : msg(error) {}
|
||||
|
||||
virtual ~empty_exception() throw() {}
|
||||
virtual ~empty_exception() BOOST_NOEXCEPT_OR_NOTHROW {}
|
||||
|
||||
virtual char const* what() const throw()
|
||||
virtual char const* what() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return msg; }
|
||||
};
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace boost { namespace spirit { namespace x3
|
||||
: std::runtime_error("boost::spirit::x3::expectation_failure")
|
||||
, where_(where), which_(which)
|
||||
{}
|
||||
~expectation_failure() throw() {}
|
||||
~expectation_failure() {}
|
||||
|
||||
std::string which() const { return which_; }
|
||||
Iterator const& where() const { return where_; }
|
||||
|
||||
Reference in New Issue
Block a user