diff --git a/docs/manual.adoc b/docs/manual.adoc index a2afee43..16bb46c9 100644 --- a/docs/manual.adoc +++ b/docs/manual.adoc @@ -2115,7 +2115,7 @@ By default, XPath functions throw `xpath_exception` object in case of errors; ad [source] ---- -virtual const char* xpath_exception::what() const throw(); +virtual const char* xpath_exception::what() const noexcept; const xpath_parse_result& xpath_exception::result() const; ---- @@ -3140,7 +3140,7 @@ const unsigned int +++parse_wnorm_attribute operator +++unspecified_bool_type+++() const; +++class xpath_exception+++: public std::exception - virtual const char* +++what+++() const throw(); + virtual const char* +++what+++() const noexcept; const xpath_parse_result& +++result+++() const; diff --git a/src/pugixml.cpp b/src/pugixml.cpp index ec69ef6a..9e4bc8f2 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -12700,7 +12700,7 @@ namespace pugi assert(_result.error); } - PUGI_IMPL_FN const char* xpath_exception::what() const throw() + PUGI_IMPL_FN const char* xpath_exception::what() const PUGIXML_NOEXCEPT { return _result.error; } diff --git a/src/pugixml.hpp b/src/pugixml.hpp index 2fa6edb5..f2d985e0 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -96,14 +96,14 @@ # endif #endif -// If C++ is 2011 or higher, add 'noexcept' specifiers +// If C++ is 2011 or higher, use 'noexcept' specifiers #ifndef PUGIXML_NOEXCEPT # if __cplusplus >= 201103 # define PUGIXML_NOEXCEPT noexcept # elif defined(_MSC_VER) && _MSC_VER >= 1900 # define PUGIXML_NOEXCEPT noexcept # else -# define PUGIXML_NOEXCEPT +# define PUGIXML_NOEXCEPT throw() # endif #endif @@ -1383,7 +1383,7 @@ namespace pugi explicit xpath_exception(const xpath_parse_result& result); // Get error message - virtual const char* what() const throw() PUGIXML_OVERRIDE; + virtual const char* what() const PUGIXML_NOEXCEPT PUGIXML_OVERRIDE; // Get parse result const xpath_parse_result& result() const;