diff --git a/TODO b/TODO index a259df9e6..dc70d7a25 100644 --- a/TODO +++ b/TODO @@ -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) diff --git a/src/entt/container/dense_map.hpp b/src/entt/container/dense_map.hpp index d2a448b43..37ec641fc 100644 --- a/src/entt/container/dense_map.hpp +++ b/src/entt/container/dense_map.hpp @@ -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> &&std::is_nothrow_move_constructible_v>) = 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> &&std::is_nothrow_move_assignable_v>) = default; /** * @brief Returns the associated allocator. diff --git a/src/entt/container/dense_set.hpp b/src/entt/container/dense_set.hpp index 3cceed6ea..f52bab980 100644 --- a/src/entt/container/dense_set.hpp +++ b/src/entt/container/dense_set.hpp @@ -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> &&std::is_nothrow_move_constructible_v>) = 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> &&std::is_nothrow_move_assignable_v>) = default; /** * @brief Returns the associated allocator. diff --git a/src/entt/entity/registry.hpp b/src/entt/entity/registry.hpp index 577b0f14a..b09612404 100644 --- a/src/entt/entity/registry.hpp +++ b/src/entt/entity/registry.hpp @@ -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);