diff options
Diffstat (limited to 'libstdc++-v3/include/ext/new_allocator.h')
-rw-r--r-- | libstdc++-v3/include/ext/new_allocator.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libstdc++-v3/include/ext/new_allocator.h b/libstdc++-v3/include/ext/new_allocator.h index 959d6880276..131718b8b2f 100644 --- a/libstdc++-v3/include/ext/new_allocator.h +++ b/libstdc++-v3/include/ext/new_allocator.h @@ -146,14 +146,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Up, typename... _Args> void construct(_Up* __p, _Args&&... __args) - noexcept(noexcept(::new((void *)__p) - _Up(std::forward<_Args>(__args)...))) + noexcept(std::is_nothrow_constructible<_Up, _Args...>::value) { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } template<typename _Up> void destroy(_Up* __p) - noexcept(noexcept( __p->~_Up())) + noexcept(std::is_nothrow_destructible<_Up>::value) { __p->~_Up(); } #else // _GLIBCXX_RESOLVE_LIB_DEFECTS |