Quellcode durchsuchen

view: avoid forcing non-integral entity types

Michele Caini vor 2 Jahren
Ursprung
Commit
a4a0abdbd6
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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.
      * @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];
     }