sparse_set/storage: make it clear that dtor and move op are not noexcept
This commit is contained in:
1
TODO
1
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
|
||||
|
||||
@@ -93,7 +93,7 @@ template<typename... Lhs, typename... Rhs>
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user