C++: Use noexcept instead of throw()

Runtime-checked exception specifications via throw() are
deprecated in C++11.
This commit is contained in:
Daniel Elstner 2015-10-11 12:19:27 +02:00
parent c6e18e007a
commit 15914cdb0f
2 changed files with 4 additions and 4 deletions

View File

@ -60,12 +60,12 @@ Error::Error(int result) : result(result)
{ {
} }
const char *Error::what() const throw() const char *Error::what() const noexcept
{ {
return sr_strerror(result); return sr_strerror(result);
} }
Error::~Error() throw() Error::~Error() noexcept
{ {
} }

View File

@ -121,9 +121,9 @@ class SR_API Error: public exception
{ {
public: public:
explicit Error(int result); explicit Error(int result);
~Error() throw(); ~Error() noexcept;
const int result; const int result;
const char *what() const throw(); const char *what() const noexcept;
}; };
/* Base template for classes whose resources are owned by a parent object. */ /* Base template for classes whose resources are owned by a parent object. */