diff --git a/thrust/system/detail/bad_alloc.h b/thrust/system/detail/bad_alloc.h index d568b0283..09d173113 100644 --- a/thrust/system/detail/bad_alloc.h +++ b/thrust/system/detail/bad_alloc.h @@ -43,7 +43,7 @@ class bad_alloc inline virtual ~bad_alloc(void) throw () {}; - inline virtual const char *what(void) const throw() + inline virtual const char *what(void) const noexcept { return m_what.c_str(); } // end what() diff --git a/thrust/system/detail/system_error.inl b/thrust/system/detail/system_error.inl index 787bf30d3..075fe88e4 100644 --- a/thrust/system/detail/system_error.inl +++ b/thrust/system/detail/system_error.inl @@ -76,14 +76,14 @@ system_error const error_code &system_error - ::code(void) const throw() + ::code(void) const noexcept { return m_error_code; } // end system_error::code() const char *system_error - ::what(void) const throw() + ::what(void) const noexcept { if(m_what.empty()) { diff --git a/thrust/system/system_error.h b/thrust/system/system_error.h index cf6139330..226ff9b4d 100644 --- a/thrust/system/system_error.h +++ b/thrust/system/system_error.h @@ -146,13 +146,13 @@ class system_error * \return ec or error_code(ev, ecat), from the * constructor, as appropriate. */ - inline const error_code &code(void) const throw(); + inline const error_code &code(void) const noexcept; /*! Returns a human-readable string indicating the nature of the error. * \return a string incorporating code().message() and the * arguments supplied in the constructor. */ - inline const char *what(void) const throw(); + inline const char *what(void) const noexcept; /*! \cond */