From 837652624b203f63917abbf48ca3be0d090dbabd Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 23 Oct 2021 08:14:30 -0700 Subject: Remove an unnecessary noexcept --- common/almalloc.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'common/almalloc.h') 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 -inline std::enable_if_t::value,T> -uninitialized_default_construct_n(T first, N count) - noexcept(std::is_nothrow_default_constructible::value_type>::value) +inline std::enable_if_t::value, +T> uninitialized_default_construct_n(T first, N count) { using ValueT = typename std::iterator_traits::value_type; T current{first}; @@ -194,8 +193,7 @@ struct FlexArrayStorage { sizeof(FlexArrayStorage)) + base; } - FlexArrayStorage(size_t size) noexcept(std::is_nothrow_default_constructible::value) - : mSize{size} + FlexArrayStorage(size_t size) : mSize{size} { al::uninitialized_default_construct_n(mArray, mSize); } ~FlexArrayStorage() = default; @@ -217,8 +215,7 @@ struct FlexArrayStorage { sizeof(FlexArrayStorage)) + base; } - FlexArrayStorage(size_t size) noexcept(std::is_nothrow_default_constructible::value) - : mSize{size} + FlexArrayStorage(size_t size) : mSize{size} { al::uninitialized_default_construct_n(mArray, mSize); } ~FlexArrayStorage() { al::destroy_n(mArray, mSize); } -- cgit v1.2.3