Browse Source

view: ::contains in_place support for single type views

Michele Caini 1 year ago
parent
commit
b2cdc6aa57
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/entt/entity/view.hpp

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

@@ -802,7 +802,7 @@ public:
      * @return True if the view contains the given entity, false otherwise.
      */
     [[nodiscard]] bool contains(const entity_type entt) const noexcept {
-        if constexpr(Policy == deletion_policy::swap_and_pop) {
+        if constexpr(Policy == deletion_policy::swap_and_pop || Policy == deletion_policy::in_place) {
             return leading && leading->contains(entt);
         } else {
             static_assert(Policy == deletion_policy::swap_only, "Unexpected storage policy");