Browse Source

tombstone: zero-sized version support

Michele Caini 2 years ago
parent
commit
463e8e0098
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/entt/entity/entity.hpp

+ 1 - 1
src/entt/entity/entity.hpp

@@ -314,7 +314,7 @@ struct tombstone_t {
     template<typename Entity>
     [[nodiscard]] constexpr bool operator==(const Entity entity) const noexcept {
         using traits_type = entt_traits<Entity>;
-        return traits_type::to_version(entity) == traits_type::to_version(*this);
+        return traits_type::version_mask && (traits_type::to_version(entity) == traits_type::to_version(*this));
     }
 
     /**