diff --git a/include/oneapi/tbb/memory_pool.h b/include/oneapi/tbb/memory_pool.h index b2e6b05191..d37fd00a59 100644 --- a/include/oneapi/tbb/memory_pool.h +++ b/include/oneapi/tbb/memory_pool.h @@ -97,10 +97,10 @@ class memory_pool_allocator { typedef memory_pool_allocator other; }; - explicit memory_pool_allocator(pool_type &pool) throw() : my_pool(&pool) {} - memory_pool_allocator(const memory_pool_allocator& src) throw() : my_pool(src.my_pool) {} + explicit memory_pool_allocator(pool_type &pool) noexcept : my_pool(&pool) {} + memory_pool_allocator(const memory_pool_allocator& src) noexcept : my_pool(src.my_pool) {} template - memory_pool_allocator(const memory_pool_allocator& src) throw() : my_pool(src.my_pool) {} + memory_pool_allocator(const memory_pool_allocator& src) noexcept : my_pool(src.my_pool) {} pointer address(reference x) const { return &x; } const_pointer address(const_reference x) const { return &x; } @@ -117,7 +117,7 @@ class memory_pool_allocator { my_pool->free(p); } //! Largest value for which method allocate might succeed. - size_type max_size() const throw() { + size_type max_size() const noexcept { size_type max = static_cast(-1) / sizeof (value_type); return (max > 0 ? max : 1); } @@ -149,10 +149,10 @@ class memory_pool_allocator { typedef memory_pool_allocator other; }; - explicit memory_pool_allocator( pool_type &pool) throw() : my_pool(&pool) {} - memory_pool_allocator( const memory_pool_allocator& src) throw() : my_pool(src.my_pool) {} + explicit memory_pool_allocator( pool_type &pool) noexcept : my_pool(&pool) {} + memory_pool_allocator( const memory_pool_allocator& src) noexcept : my_pool(src.my_pool) {} template - memory_pool_allocator(const memory_pool_allocator& src) throw() : my_pool(src.my_pool) {} + memory_pool_allocator(const memory_pool_allocator& src) noexcept : my_pool(src.my_pool) {} protected: pool_type *my_pool; diff --git a/src/tbbmalloc_proxy/proxy.cpp b/src/tbbmalloc_proxy/proxy.cpp index 23b9c19c1c..b4b8643d69 100644 --- a/src/tbbmalloc_proxy/proxy.cpp +++ b/src/tbbmalloc_proxy/proxy.cpp @@ -602,8 +602,8 @@ _expand (by dummy implementation) ??_V@YAXPEAX@Z void * operator new[](unsigned __int64) (intel64) ??3@YAXPEAX@Z operator delete (intel64) ??_V@YAXPEAX@Z operator delete[] (intel64) -??2@YAPAXIABUnothrow_t@std@@@Z void * operator new (size_t sz, const std::nothrow_t&) throw() (optional) -??_U@YAPAXIABUnothrow_t@std@@@Z void * operator new[] (size_t sz, const std::nothrow_t&) throw() (optional) +??2@YAPAXIABUnothrow_t@std@@@Z void * operator new (size_t sz, const std::nothrow_t&) noexcept (optional) +??_U@YAPAXIABUnothrow_t@std@@@Z void * operator new[] (size_t sz, const std::nothrow_t&) noexcept (optional) and these functions have runtime-specific replacement: realloc diff --git a/test/common/exception_handling.h b/test/common/exception_handling.h index 55dbe0fc20..9143cbf876 100644 --- a/test/common/exception_handling.h +++ b/test/common/exception_handling.h @@ -102,7 +102,7 @@ class test_exception : public std::exception { public: test_exception ( const char* description ) : my_description(description) {} - const char* what() const throw() override { return my_description; } + const char* what() const noexcept override { return my_description; } }; class solitary_test_exception : public test_exception { diff --git a/test/conformance/conformance_concurrent_hash_map.cpp b/test/conformance/conformance_concurrent_hash_map.cpp index 0c3ec6e93a..af85f2b2ca 100644 --- a/test/conformance/conformance_concurrent_hash_map.cpp +++ b/test/conformance/conformance_concurrent_hash_map.cpp @@ -35,8 +35,8 @@ that concurrent_hash_map uses only the required interface. */ class MyException : public std::bad_alloc { public: - virtual const char *what() const throw() override { return "out of items limit"; } - virtual ~MyException() throw() {} + virtual const char *what() const noexcept override { return "out of items limit"; } + virtual ~MyException() noexcept {} }; /** Has tightly controlled interface so that we can verify diff --git a/test/conformance/conformance_concurrent_queue.cpp b/test/conformance/conformance_concurrent_queue.cpp index 32c1652e94..5f47790075 100644 --- a/test/conformance/conformance_concurrent_queue.cpp +++ b/test/conformance/conformance_concurrent_queue.cpp @@ -777,8 +777,8 @@ void TestConcurrentPushPop() { class Foo_exception : public std::bad_alloc { public: - virtual const char *what() const throw() override { return "out of Foo limit"; } - virtual ~Foo_exception() throw() {} + virtual const char *what() const noexcept override { return "out of Foo limit"; } + virtual ~Foo_exception() noexcept {} }; #if TBB_USE_EXCEPTIONS diff --git a/test/tbb/test_task_group.cpp b/test/tbb/test_task_group.cpp index d39b4fc703..955496eb29 100644 --- a/test/tbb/test_task_group.cpp +++ b/test/tbb/test_task_group.cpp @@ -397,7 +397,7 @@ class test_exception : public std::exception public: test_exception ( const char* descr ) : m_strDescription(descr) {} - const char* what() const throw() override { return m_strDescription; } + const char* what() const noexcept override { return m_strDescription; } }; using TestException = test_exception; @@ -1204,4 +1204,3 @@ TEST_CASE("task_handle cannot be scheduled into other task_group of the same con } #endif // TBB_USE_EXCEPTIONS -