diff --git a/src/entt/entity/group.hpp b/src/entt/entity/group.hpp index 89059963b..0d3141271 100644 --- a/src/entt/entity/group.hpp +++ b/src/entt/entity/group.hpp @@ -186,7 +186,7 @@ public: */ template [[nodiscard]] decltype(auto) storage() const noexcept { - static constexpr auto offset = sizeof...(Get); + constexpr auto offset = sizeof...(Get); if constexpr(Index < offset) { return *std::get(pools); @@ -584,7 +584,7 @@ public: */ template [[nodiscard]] decltype(auto) storage() const noexcept { - static constexpr auto offset = sizeof...(Owned) + sizeof...(Get); + constexpr auto offset = sizeof...(Owned) + sizeof...(Get); if constexpr(Index < offset) { return *std::get(pools); diff --git a/src/entt/entity/view.hpp b/src/entt/entity/view.hpp index bff92b277..f061dd120 100644 --- a/src/entt/entity/view.hpp +++ b/src/entt/entity/view.hpp @@ -330,7 +330,7 @@ public: */ template [[nodiscard]] decltype(auto) storage() const noexcept { - static constexpr auto offset = sizeof...(Get); + constexpr auto offset = sizeof...(Get); if constexpr(Index < offset) { return *std::get(pools);