diff --git a/src/entt/entity/sparse_set.hpp b/src/entt/entity/sparse_set.hpp index d35e448cf..72eec8ad7 100644 --- a/src/entt/entity/sparse_set.hpp +++ b/src/entt/entity/sparse_set.hpp @@ -911,7 +911,7 @@ public: template void sort_n(const size_type length, Compare compare, Sort algo = Sort{}, Args &&...args) { ENTT_ASSERT(!(length > packed.size()), "Length exceeds the number of elements"); - ENTT_ASSERT(free_list == null, "Partial sorting with tombstones is not supported"); + ENTT_ASSERT((mode != deletion_policy::in_place) || (free_list == null), "Partial sorting with tombstones is not supported"); algo(packed.rend() - length, packed.rend(), std::move(compare), std::forward(args)...);