diff options
author | Chris Robinson <[email protected]> | 2021-10-23 08:14:30 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2021-10-23 08:14:30 -0700 |
commit | 837652624b203f63917abbf48ca3be0d090dbabd (patch) | |
tree | 22371b0f7722ab1feb39b704d29e9d163b862f94 /common/almalloc.h | |
parent | 1a448b2e927cb99b3b9e5ef9b760d6052d866d77 (diff) |
Remove an unnecessary noexcept
Diffstat (limited to 'common/almalloc.h')
-rw-r--r-- | common/almalloc.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/common/almalloc.h b/common/almalloc.h index 62c6c6d9..70a400c4 100644 --- a/common/almalloc.h +++ b/common/almalloc.h @@ -154,9 +154,8 @@ destroy_n(T first, N count) noexcept(noexcept(al::destroy_at(std::addressof(*fir template<typename T, typename N> -inline std::enable_if_t<std::is_integral<N>::value,T> -uninitialized_default_construct_n(T first, N count) - noexcept(std::is_nothrow_default_constructible<typename std::iterator_traits<T>::value_type>::value) +inline std::enable_if_t<std::is_integral<N>::value, +T> uninitialized_default_construct_n(T first, N count) { using ValueT = typename std::iterator_traits<T>::value_type; T current{first}; @@ -194,8 +193,7 @@ struct FlexArrayStorage { sizeof(FlexArrayStorage)) + base; } - FlexArrayStorage(size_t size) noexcept(std::is_nothrow_default_constructible<T>::value) - : mSize{size} + FlexArrayStorage(size_t size) : mSize{size} { al::uninitialized_default_construct_n(mArray, mSize); } ~FlexArrayStorage() = default; @@ -217,8 +215,7 @@ struct FlexArrayStorage<T,alignment,false> { sizeof(FlexArrayStorage)) + base; } - FlexArrayStorage(size_t size) noexcept(std::is_nothrow_default_constructible<T>::value) - : mSize{size} + FlexArrayStorage(size_t size) : mSize{size} { al::uninitialized_default_construct_n(mArray, mSize); } ~FlexArrayStorage() { al::destroy_n(mArray, mSize); } |