Browse Source

view: avoid forcing non-integral entity types

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

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

@@ -860,7 +860,7 @@ public:
      * @param pos Position of the element to return.
      * @param pos Position of the element to return.
      * @return The identifier that occupies the given position.
      * @return The identifier that occupies the given position.
      */
      */
-    [[nodiscard]] entity_type operator[](const size_type pos) const {
+    [[deprecated("use .begin()[pos] instead")]] [[nodiscard]] entity_type operator[](const size_type pos) const {
         return base_type::begin()[pos];
         return base_type::begin()[pos];
     }
     }