C++: Use noexcept instead of throw()
Runtime-checked exception specifications via throw() are deprecated in C++11.
This commit is contained in:
parent
c6e18e007a
commit
15914cdb0f
|
@ -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
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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. */
|
||||||
|
|
Loading…
Reference in New Issue