diff options
Diffstat (limited to 'libcxx/src')
-rw-r--r-- | libcxx/src/exception.cpp | 30 | ||||
-rw-r--r-- | libcxx/src/new.cpp | 32 | ||||
-rw-r--r-- | libcxx/src/typeinfo.cpp | 12 |
3 files changed, 37 insertions, 37 deletions
diff --git a/libcxx/src/exception.cpp b/libcxx/src/exception.cpp index 42d0721c5ac..b0efda648e5 100644 --- a/libcxx/src/exception.cpp +++ b/libcxx/src/exception.cpp @@ -24,13 +24,13 @@ #endif // __APPLE__ std::unexpected_handler -std::set_unexpected(std::unexpected_handler func) throw() +std::set_unexpected(std::unexpected_handler func) _NOEXCEPT { return __sync_lock_test_and_set(&__unexpected_handler, func); } std::unexpected_handler -std::get_unexpected() throw() +std::get_unexpected() _NOEXCEPT { return __sync_fetch_and_add(&__unexpected_handler, (std::unexpected_handler)0); } @@ -45,13 +45,13 @@ std::unexpected() } std::terminate_handler -std::set_terminate(std::terminate_handler func) throw() +std::set_terminate(std::terminate_handler func) _NOEXCEPT { return __sync_lock_test_and_set(&__terminate_handler, func); } std::terminate_handler -std::get_terminate() throw() +std::get_terminate() _NOEXCEPT { return __sync_fetch_and_add(&__terminate_handler, (std::terminate_handler)0); } @@ -76,7 +76,7 @@ std::terminate() _NOEXCEPT #endif // _LIBCPP_NO_EXCEPTIONS } -bool std::uncaught_exception() throw() +bool std::uncaught_exception() _NOEXCEPT { #if __APPLE__ // on Darwin, there is a helper function so __cxa_get_globals is private @@ -93,25 +93,25 @@ bool std::uncaught_exception() throw() namespace std { -exception::~exception() throw() +exception::~exception() _NOEXCEPT { } -bad_exception::~bad_exception() throw() +bad_exception::~bad_exception() _NOEXCEPT { } -const char* exception::what() const throw() +const char* exception::what() const _NOEXCEPT { return "std::exception"; } -const char* bad_exception::what() const throw() +const char* bad_exception::what() const _NOEXCEPT { return "std::bad_exception"; } -exception_ptr::~exception_ptr() +exception_ptr::~exception_ptr() _NOEXCEPT { #if __APPLE__ __cxxabiapple::__cxa_decrement_exception_refcount(__ptr_); @@ -121,7 +121,7 @@ exception_ptr::~exception_ptr() #endif // __APPLE__ } -exception_ptr::exception_ptr(const exception_ptr& other) +exception_ptr::exception_ptr(const exception_ptr& other) _NOEXCEPT : __ptr_(other.__ptr_) { #if __APPLE__ @@ -132,7 +132,7 @@ exception_ptr::exception_ptr(const exception_ptr& other) #endif // __APPLE__ } -exception_ptr& exception_ptr::operator=(const exception_ptr& other) +exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT { #if __APPLE__ if (__ptr_ != other.__ptr_) @@ -148,12 +148,12 @@ exception_ptr& exception_ptr::operator=(const exception_ptr& other) #endif // __APPLE__ } -nested_exception::nested_exception() +nested_exception::nested_exception() _NOEXCEPT : __ptr_(current_exception()) { } -nested_exception::~nested_exception() +nested_exception::~nested_exception() _NOEXCEPT { } @@ -168,7 +168,7 @@ nested_exception::rethrow_nested() const } // std -std::exception_ptr std::current_exception() +std::exception_ptr std::current_exception() _NOEXCEPT { #if __APPLE__ // be nicer if there was a constructor that took a ptr, then diff --git a/libcxx/src/new.cpp b/libcxx/src/new.cpp index 55e70ad0e76..d629185e085 100644 --- a/libcxx/src/new.cpp +++ b/libcxx/src/new.cpp @@ -27,7 +27,7 @@ __attribute__((__weak__, __visibility__("default"))) void * -operator new(std::size_t size) throw (std::bad_alloc) +operator new(std::size_t size) { if (size == 0) size = 1; @@ -51,7 +51,7 @@ operator new(std::size_t size) throw (std::bad_alloc) __attribute__((__weak__, __visibility__("default"))) void* -operator new(size_t size, const std::nothrow_t&) throw() +operator new(size_t size, const std::nothrow_t&) _NOEXCEPT { void* p = 0; #ifndef _LIBCPP_NO_EXCEPTIONS @@ -70,14 +70,14 @@ operator new(size_t size, const std::nothrow_t&) throw() __attribute__((__weak__, __visibility__("default"))) void* -operator new[](size_t size) throw (std::bad_alloc) +operator new[](size_t size) { return ::operator new(size); } __attribute__((__weak__, __visibility__("default"))) void* -operator new[](size_t size, const std::nothrow_t& nothrow) throw() +operator new[](size_t size, const std::nothrow_t& nothrow) _NOEXCEPT { void* p = 0; #ifndef _LIBCPP_NO_EXCEPTIONS @@ -96,7 +96,7 @@ operator new[](size_t size, const std::nothrow_t& nothrow) throw() __attribute__((__weak__, __visibility__("default"))) void -operator delete(void* ptr) throw () +operator delete(void* ptr) _NOEXCEPT { if (ptr) ::free(ptr); @@ -104,21 +104,21 @@ operator delete(void* ptr) throw () __attribute__((__weak__, __visibility__("default"))) void -operator delete(void* ptr, const std::nothrow_t&) throw () +operator delete(void* ptr, const std::nothrow_t&) _NOEXCEPT { ::operator delete(ptr); } __attribute__((__weak__, __visibility__("default"))) void -operator delete[] (void* ptr) throw () +operator delete[] (void* ptr) _NOEXCEPT { ::operator delete (ptr); } __attribute__((__weak__, __visibility__("default"))) void -operator delete[] (void* ptr, const std::nothrow_t&) throw () +operator delete[] (void* ptr, const std::nothrow_t&) _NOEXCEPT { ::operator delete[](ptr); } @@ -129,41 +129,41 @@ namespace std const nothrow_t nothrow = {}; new_handler -set_new_handler(new_handler handler) throw() +set_new_handler(new_handler handler) _NOEXCEPT { return __sync_lock_test_and_set(&__new_handler, handler); } new_handler -get_new_handler() throw() +get_new_handler() _NOEXCEPT { return __sync_fetch_and_add(&__new_handler, (new_handler)0); } -bad_alloc::bad_alloc() throw() +bad_alloc::bad_alloc() _NOEXCEPT { } -bad_alloc::~bad_alloc() throw() +bad_alloc::~bad_alloc() _NOEXCEPT { } const char* -bad_alloc::what() const throw() +bad_alloc::what() const _NOEXCEPT { return "std::bad_alloc"; } -bad_array_new_length::bad_array_new_length() throw() +bad_array_new_length::bad_array_new_length() _NOEXCEPT { } -bad_array_new_length::~bad_array_new_length() throw() +bad_array_new_length::~bad_array_new_length() _NOEXCEPT { } const char* -bad_array_new_length::what() const throw() +bad_array_new_length::what() const _NOEXCEPT { return "bad_array_new_length"; } diff --git a/libcxx/src/typeinfo.cpp b/libcxx/src/typeinfo.cpp index 2dca96fd4bb..9ca03a183e9 100644 --- a/libcxx/src/typeinfo.cpp +++ b/libcxx/src/typeinfo.cpp @@ -13,30 +13,30 @@ #include "typeinfo" -std::bad_cast::bad_cast() throw() +std::bad_cast::bad_cast() _NOEXCEPT { } -std::bad_cast::~bad_cast() throw() +std::bad_cast::~bad_cast() _NOEXCEPT { } const char* -std::bad_cast::what() const throw() +std::bad_cast::what() const _NOEXCEPT { return "std::bad_cast"; } -std::bad_typeid::bad_typeid() throw() +std::bad_typeid::bad_typeid() _NOEXCEPT { } -std::bad_typeid::~bad_typeid() throw() +std::bad_typeid::~bad_typeid() _NOEXCEPT { } const char* -std::bad_typeid::what() const throw() +std::bad_typeid::what() const _NOEXCEPT { return "std::bad_typeid"; } |