Skip to content

Commit 7e70274

Browse files
authored
Merge pull request #623 from r-barnes/master
throw() -> noexcept
2 parents a0db6e2 + d713fd2 commit 7e70274

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

docs/manual.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2115,7 +2115,7 @@ By default, XPath functions throw `xpath_exception` object in case of errors; ad
21152115

21162116
[source]
21172117
----
2118-
virtual const char* xpath_exception::what() const throw();
2118+
virtual const char* xpath_exception::what() const noexcept;
21192119
const xpath_parse_result& xpath_exception::result() const;
21202120
----
21212121

@@ -3140,7 +3140,7 @@ const unsigned int +++<a href="#parse_wnorm_attribute">parse_wnorm_attribute</a>
31403140
operator +++<a href="#xpath_query::unspecified_bool_type">unspecified_bool_type</a>+++() const;
31413141
31423142
+++<span class="tok-k">class</span> <a href="#xpath_exception">xpath_exception</a>+++: public std::exception
3143-
virtual const char* +++<a href="#xpath_exception::what">what</a>+++() const throw();
3143+
virtual const char* +++<a href="#xpath_exception::what">what</a>+++() const noexcept;
31443144
31453145
const xpath_parse_result& +++<a href="#xpath_exception::result">result</a>+++() const;
31463146

src/pugixml.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12442,7 +12442,7 @@ namespace pugi
1244212442
assert(_result.error);
1244312443
}
1244412444

12445-
PUGI_IMPL_FN const char* xpath_exception::what() const throw()
12445+
PUGI_IMPL_FN const char* xpath_exception::what() const PUGIXML_NOEXCEPT
1244612446
{
1244712447
return _result.error;
1244812448
}

src/pugixml.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@
9696
# endif
9797
#endif
9898

99-
// If C++ is 2011 or higher, add 'noexcept' specifiers
99+
// If C++ is 2011 or higher, use 'noexcept' specifiers
100100
#ifndef PUGIXML_NOEXCEPT
101101
# if __cplusplus >= 201103
102102
# define PUGIXML_NOEXCEPT noexcept
103103
# elif defined(_MSC_VER) && _MSC_VER >= 1900
104104
# define PUGIXML_NOEXCEPT noexcept
105105
# else
106-
# define PUGIXML_NOEXCEPT
106+
# define PUGIXML_NOEXCEPT throw()
107107
# endif
108108
#endif
109109

@@ -1348,7 +1348,7 @@ namespace pugi
13481348
explicit xpath_exception(const xpath_parse_result& result);
13491349

13501350
// Get error message
1351-
virtual const char* what() const throw() PUGIXML_OVERRIDE;
1351+
virtual const char* what() const PUGIXML_NOEXCEPT PUGIXML_OVERRIDE;
13521352

13531353
// Get parse result
13541354
const xpath_parse_result& result() const;

0 commit comments

Comments
 (0)