1
0
Эх сурвалжийг харах

view: avoid forcing non-integral entity types

Michele Caini 2 жил өмнө
parent
commit
a4a0abdbd6

+ 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];
     }
     }