diff options
| author | Ed Maste <emaste@FreeBSD.org> | 2024-10-22 14:42:59 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@FreeBSD.org> | 2024-10-22 14:43:39 +0000 |
| commit | 5a07cb04925d79523b5cf1cb11edfbc74b828af7 (patch) | |
| tree | f6ee1482e4b70a1d1bfefb2ab3ffa81146aa70dc /stdexcept.h | |
| parent | 156745f575946b366c430fc2bc7b9a90d5925b29 (diff) | |
Import libcxxrt master 698997bfde1fc81b0bc0bfd1a1e5e3ad6f33b634vendor/libcxxrt/2024-10-22-698997bfde1fc81b0bc0bfd1a1e5e3ad6f33b634
Interesting fixes:
045c52c Mark __cxa_allocate_exception, __cxa_free_exception and
__cxa_init_primary_exception noexcept.
8a2f123 Define _LIBCXXRT_NOEXCEPT in cxxabi.h and use it instead of
throw()
9529236 Fix memory corruption in cpp_demangle_read_sname()
8f5c74e Add test cases, fix more bugs, and improve perf
391a3dc Add a simple implementation of __cxa_call_terminate
40e4fa2 mark std::terminate as noreturn and noexcept
5eede09 Print diagnostics in default std::terminate handler
Diffstat (limited to 'stdexcept.h')
| -rw-r--r-- | stdexcept.h | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/stdexcept.h b/stdexcept.h index 892039357595..38cd36d8e566 100644 --- a/stdexcept.h +++ b/stdexcept.h @@ -29,17 +29,19 @@ * of the exceptions for the runtime to use. */ +#include "cxxabi.h" + namespace std { class exception { public: - exception() throw(); - exception(const exception&) throw(); - exception& operator=(const exception&) throw(); + exception() _LIBCXXRT_NOEXCEPT; + exception(const exception&) _LIBCXXRT_NOEXCEPT; + exception& operator=(const exception&) _LIBCXXRT_NOEXCEPT; virtual ~exception(); - virtual const char* what() const throw(); + virtual const char* what() const _LIBCXXRT_NOEXCEPT; }; @@ -49,11 +51,11 @@ namespace std class bad_alloc: public exception { public: - bad_alloc() throw(); - bad_alloc(const bad_alloc&) throw(); - bad_alloc& operator=(const bad_alloc&) throw(); + bad_alloc() _LIBCXXRT_NOEXCEPT; + bad_alloc(const bad_alloc&) _LIBCXXRT_NOEXCEPT; + bad_alloc& operator=(const bad_alloc&) _LIBCXXRT_NOEXCEPT; ~bad_alloc(); - virtual const char* what() const throw(); + virtual const char* what() const _LIBCXXRT_NOEXCEPT; }; /** @@ -61,11 +63,11 @@ namespace std */ class bad_cast: public exception { public: - bad_cast() throw(); - bad_cast(const bad_cast&) throw(); - bad_cast& operator=(const bad_cast&) throw(); + bad_cast() _LIBCXXRT_NOEXCEPT; + bad_cast(const bad_cast&) _LIBCXXRT_NOEXCEPT; + bad_cast& operator=(const bad_cast&) _LIBCXXRT_NOEXCEPT; virtual ~bad_cast(); - virtual const char* what() const throw(); + virtual const char* what() const _LIBCXXRT_NOEXCEPT; }; /** @@ -74,21 +76,21 @@ namespace std class bad_typeid: public exception { public: - bad_typeid() throw(); - bad_typeid(const bad_typeid &__rhs) throw(); + bad_typeid() _LIBCXXRT_NOEXCEPT; + bad_typeid(const bad_typeid &__rhs) _LIBCXXRT_NOEXCEPT; virtual ~bad_typeid(); - bad_typeid& operator=(const bad_typeid &__rhs) throw(); - virtual const char* what() const throw(); + bad_typeid& operator=(const bad_typeid &__rhs) _LIBCXXRT_NOEXCEPT; + virtual const char* what() const _LIBCXXRT_NOEXCEPT; }; class bad_array_new_length: public bad_alloc { public: - bad_array_new_length() throw(); - bad_array_new_length(const bad_array_new_length&) throw(); - bad_array_new_length& operator=(const bad_array_new_length&) throw(); + bad_array_new_length() _LIBCXXRT_NOEXCEPT; + bad_array_new_length(const bad_array_new_length&) _LIBCXXRT_NOEXCEPT; + bad_array_new_length& operator=(const bad_array_new_length&) _LIBCXXRT_NOEXCEPT; virtual ~bad_array_new_length(); - virtual const char *what() const throw(); + virtual const char *what() const _LIBCXXRT_NOEXCEPT; }; |
