Skip to content

Commit a5ce90b

Browse files
committed
core: noexcept-ness review
1 parent a92be68 commit a5ce90b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/entt/core/compressed_pair.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,13 @@ class compressed_pair final
111111
* @brief Copy constructor.
112112
* @param other The instance to copy from.
113113
*/
114-
constexpr compressed_pair(const compressed_pair &other) noexcept(std::is_nothrow_copy_constructible_v<first_base> && std::is_nothrow_copy_constructible_v<second_base>) = default;
114+
constexpr compressed_pair(const compressed_pair &other) = default;
115115

116116
/**
117117
* @brief Move constructor.
118118
* @param other The instance to move from.
119119
*/
120-
constexpr compressed_pair(compressed_pair &&other) noexcept(std::is_nothrow_move_constructible_v<first_base> && std::is_nothrow_move_constructible_v<second_base>) = default;
120+
constexpr compressed_pair(compressed_pair &&other) noexcept = default;
121121

122122
/**
123123
* @brief Constructs a pair from its values.
@@ -151,14 +151,14 @@ class compressed_pair final
151151
* @param other The instance to copy from.
152152
* @return This compressed pair object.
153153
*/
154-
constexpr compressed_pair &operator=(const compressed_pair &other) noexcept(std::is_nothrow_copy_assignable_v<first_base> && std::is_nothrow_copy_assignable_v<second_base>) = default;
154+
constexpr compressed_pair &operator=(const compressed_pair &other) = default;
155155

156156
/**
157157
* @brief Move assignment operator.
158158
* @param other The instance to move from.
159159
* @return This compressed pair object.
160160
*/
161-
constexpr compressed_pair &operator=(compressed_pair &&other) noexcept(std::is_nothrow_move_assignable_v<first_base> && std::is_nothrow_move_assignable_v<second_base>) = default;
161+
constexpr compressed_pair &operator=(compressed_pair &&other) noexcept = default;
162162

163163
/**
164164
* @brief Returns the first element that a pair stores.
@@ -190,7 +190,7 @@ class compressed_pair final
190190
* @brief Swaps two compressed pair objects.
191191
* @param other The compressed pair to swap with.
192192
*/
193-
constexpr void swap(compressed_pair &other) noexcept(std::is_nothrow_swappable_v<first_type> && std::is_nothrow_swappable_v<second_type>) {
193+
constexpr void swap(compressed_pair &other) noexcept {
194194
using std::swap;
195195
swap(first(), other.first());
196196
swap(second(), other.second());

src/entt/core/iterator.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ struct iterable_adaptor final {
147147
using sentinel = Sentinel;
148148

149149
/*! @brief Default constructor. */
150-
constexpr iterable_adaptor() noexcept(std::is_nothrow_default_constructible_v<iterator> &&std::is_nothrow_default_constructible_v<sentinel>)
150+
constexpr iterable_adaptor() noexcept(std::is_nothrow_default_constructible_v<iterator> && std::is_nothrow_default_constructible_v<sentinel>)
151151
: first{},
152152
last{} {}
153153

@@ -156,7 +156,7 @@ struct iterable_adaptor final {
156156
* @param from Begin iterator.
157157
* @param to End iterator.
158158
*/
159-
constexpr iterable_adaptor(iterator from, sentinel to) noexcept(std::is_nothrow_move_constructible_v<iterator> &&std::is_nothrow_move_constructible_v<sentinel>)
159+
constexpr iterable_adaptor(iterator from, sentinel to) noexcept(std::is_nothrow_move_constructible_v<iterator> && std::is_nothrow_move_constructible_v<sentinel>)
160160
: first{std::move(from)},
161161
last{std::move(to)} {}
162162

0 commit comments

Comments
 (0)