diff --git a/TODO b/TODO index 05f1613e7..0fbae510d 100644 --- a/TODO +++ b/TODO @@ -45,3 +45,4 @@ TODO: * view and view iterator specializations for multi, single and filtered elements * organizer support to groups * meta range: move id to meta objects and return plain types (?), then remove id from meta base and meta ctor too +* noexcept move op for sparse set and storage diff --git a/src/entt/entity/group.hpp b/src/entt/entity/group.hpp index 32abb3aa0..47ec64033 100644 --- a/src/entt/entity/group.hpp +++ b/src/entt/entity/group.hpp @@ -93,7 +93,7 @@ template struct group_descriptor { using size_type = std::size_t; - virtual ~group_descriptor() noexcept = default; + virtual ~group_descriptor() noexcept(false) = default; [[nodiscard]] virtual bool owned(const id_type) const noexcept { return false; } diff --git a/src/entt/entity/sparse_set.hpp b/src/entt/entity/sparse_set.hpp index b0c251b93..9ef6abeb8 100644 --- a/src/entt/entity/sparse_set.hpp +++ b/src/entt/entity/sparse_set.hpp @@ -453,7 +453,7 @@ public: } /*! @brief Default destructor. */ - virtual ~basic_sparse_set() noexcept { + virtual ~basic_sparse_set() noexcept(false) { release_sparse_pages(); } @@ -468,7 +468,7 @@ public: * @param other The instance to move from. * @return This sparse set. */ - basic_sparse_set &operator=(basic_sparse_set &&other) noexcept { + basic_sparse_set &operator=(basic_sparse_set &&other) noexcept(false) { ENTT_ASSERT(alloc_traits::is_always_equal::value || get_allocator() == other.get_allocator(), "Copying a sparse set is not allowed"); release_sparse_pages(); diff --git a/src/entt/entity/storage.hpp b/src/entt/entity/storage.hpp index 9795cb9ed..d313ed7d9 100644 --- a/src/entt/entity/storage.hpp +++ b/src/entt/entity/storage.hpp @@ -461,7 +461,7 @@ public: } /*! @brief Default destructor. */ - ~basic_storage() noexcept override { + ~basic_storage() noexcept(false) override { shrink_to_size(0u); } @@ -476,7 +476,7 @@ public: * @param other The instance to move from. * @return This storage. */ - basic_storage &operator=(basic_storage &&other) noexcept { + basic_storage &operator=(basic_storage &&other) noexcept(false) { ENTT_ASSERT(alloc_traits::is_always_equal::value || get_allocator() == other.get_allocator(), "Copying a storage is not allowed"); shrink_to_size(0u); payload = std::move(other.payload);