container/entity: noexcept-ness review

This commit is contained in:
Michele Caini
2022-07-05 08:39:16 +02:00
parent 92f5f97d83
commit acbd38c1ed
4 changed files with 6 additions and 7 deletions

1
TODO
View File

@@ -14,7 +14,6 @@ DOC:
WIP:
* sparse set/storage support for move-only types, internal rework required
* get rid of observers, storage based views made them pointless - document alternatives
* dense_map/set and registry: move ctor/op should be noexcept (op is conditionally noexcept though)
* add storage getter for filters to views and groups
* exploit the tombstone mechanism to allow enabling/disabling entities (see bump, compact and clear for further details)
* emitter: runtime handlers, allocator support (ready for both already)

View File

@@ -429,7 +429,7 @@ public:
threshold{other.threshold} {}
/*! @brief Default move constructor. */
dense_map(dense_map &&) = default;
dense_map(dense_map &&) noexcept(std::is_nothrow_move_constructible_v<compressed_pair<sparse_container_type, hasher>> &&std::is_nothrow_move_constructible_v<compressed_pair<packed_container_type, key_equal>>) = default;
/**
* @brief Allocator-extended move constructor.
@@ -451,7 +451,7 @@ public:
* @brief Default move assignment operator.
* @return This container.
*/
dense_map &operator=(dense_map &&) = default;
dense_map &operator=(dense_map &&) noexcept(std::is_nothrow_move_assignable_v<compressed_pair<sparse_container_type, hasher>> &&std::is_nothrow_move_assignable_v<compressed_pair<packed_container_type, key_equal>>) = default;
/**
* @brief Returns the associated allocator.

View File

@@ -375,7 +375,7 @@ public:
threshold{other.threshold} {}
/*! @brief Default move constructor. */
dense_set(dense_set &&) = default;
dense_set(dense_set &&) noexcept(std::is_nothrow_move_constructible_v<compressed_pair<sparse_container_type, hasher>> &&std::is_nothrow_move_constructible_v<compressed_pair<packed_container_type, key_equal>>) = default;
/**
* @brief Allocator-extended move constructor.
@@ -397,7 +397,7 @@ public:
* @brief Default move assignment operator.
* @return This container.
*/
dense_set &operator=(dense_set &&) = default;
dense_set &operator=(dense_set &&) noexcept(std::is_nothrow_move_assignable_v<compressed_pair<sparse_container_type, hasher>> &&std::is_nothrow_move_assignable_v<compressed_pair<packed_container_type, key_equal>>) = default;
/**
* @brief Returns the associated allocator.

View File

@@ -351,7 +351,7 @@ public:
* @brief Move constructor.
* @param other The instance to move from.
*/
basic_registry(basic_registry &&other)
basic_registry(basic_registry &&other) noexcept
: pools{std::move(other.pools)},
groups{std::move(other.groups)},
epool{std::move(other.epool)},
@@ -367,7 +367,7 @@ public:
* @param other The instance to move from.
* @return This registry.
*/
basic_registry &operator=(basic_registry &&other) {
basic_registry &operator=(basic_registry &&other) noexcept {
pools = std::move(other.pools);
groups = std::move(other.groups);
epool = std::move(other.epool);