Browse Source

table: fixed table_iterator operator[](value)

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

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

@@ -78,7 +78,7 @@ struct table_iterator {
     }
     }
 
 
     [[nodiscard]] constexpr reference operator[](const difference_type value) const noexcept {
     [[nodiscard]] constexpr reference operator[](const difference_type value) const noexcept {
-        return std::forward_as_tuple(*std::get<It>(it)...);
+        return std::forward_as_tuple(std::get<It>(it)[value]...);
     }
     }
 
 
     [[nodiscard]] constexpr pointer operator->() const noexcept {
     [[nodiscard]] constexpr pointer operator->() const noexcept {