Просмотр исходного кода

view: avoid forcing non-integral entity types

Michele Caini 2 лет назад
Родитель
Сommit
a4a0abdbd6
1 измененных файлов с 1 добавлено и 1 удалено
  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];
     }