diff --git a/src/entt/entity/group.hpp b/src/entt/entity/group.hpp index 1fc10732b..6db761243 100644 --- a/src/entt/entity/group.hpp +++ b/src/entt/entity/group.hpp @@ -135,8 +135,8 @@ public: template group_handler(stl::tuple ogpool, stl::tuple epool) - : pools{stl::apply([](auto &&...cpool) { return std::array{&cpool...}; }, ogpool)}, - filter{stl::apply([](auto &&...cpool) { return std::array{&cpool...}; }, epool)} { + : pools{stl::apply([](auto &&...cpool) { return stl::array{&cpool...}; }, ogpool)}, + filter{stl::apply([](auto &&...cpool) { return stl::array{&cpool...}; }, epool)} { stl::apply([this](auto &...cpool) { ((cpool.on_construct().template connect<&group_handler::push_on_construct>(*this), cpool.on_destroy().template connect<&group_handler::remove_if>(*this)), ...); }, ogpool); stl::apply([this](auto &...cpool) { ((cpool.on_construct().template connect<&group_handler::remove_if>(*this), cpool.on_destroy().template connect<&group_handler::push_on_destroy>(*this)), ...); }, epool); common_setup(); @@ -166,8 +166,8 @@ public: } private: - std::array pools; - std::array filter; + stl::array pools; + stl::array filter; std::size_t len{}; }; @@ -206,8 +206,8 @@ public: template group_handler(const Allocator &allocator, stl::tuple gpool, stl::tuple epool) - : pools{stl::apply([](auto &&...cpool) { return std::array{&cpool...}; }, gpool)}, - filter{stl::apply([](auto &&...cpool) { return std::array{&cpool...}; }, epool)}, + : pools{stl::apply([](auto &&...cpool) { return stl::array{&cpool...}; }, gpool)}, + filter{stl::apply([](auto &&...cpool) { return stl::array{&cpool...}; }, epool)}, elem{allocator} { stl::apply([this](auto &...cpool) { ((cpool.on_construct().template connect<&group_handler::push_on_construct>(*this), cpool.on_destroy().template connect<&group_handler::remove_if>(*this)), ...); }, gpool); stl::apply([this](auto &...cpool) { ((cpool.on_construct().template connect<&group_handler::remove_if>(*this), cpool.on_destroy().template connect<&group_handler::push_on_destroy>(*this)), ...); }, epool); @@ -232,8 +232,8 @@ public: } private: - std::array pools; - std::array filter; + stl::array pools; + stl::array filter; common_type elem; }; diff --git a/src/entt/entity/registry.hpp b/src/entt/entity/registry.hpp index 15886a7c0..8aae20e3d 100644 --- a/src/entt/entity/registry.hpp +++ b/src/entt/entity/registry.hpp @@ -696,7 +696,7 @@ public: size_type count{}; if constexpr(stl::is_same_v) { - std::array cpools{static_cast(&assure()), static_cast(&assure())...}; + stl::array cpools{static_cast(&assure()), static_cast(&assure())...}; for(auto from = cpools.begin(), to = cpools.end(); from != to; ++from) { if constexpr(sizeof...(Other) != 0u) { @@ -747,7 +747,7 @@ public: template void erase(It first, It last) { if constexpr(stl::is_same_v) { - std::array cpools{static_cast(&assure()), static_cast(&assure())...}; + stl::array cpools{static_cast(&assure()), static_cast(&assure())...}; for(auto from = cpools.begin(), to = cpools.end(); from != to; ++from) { if constexpr(sizeof...(Other) != 0u) { diff --git a/src/entt/entity/view.hpp b/src/entt/entity/view.hpp index bcc1bf911..9a13608a2 100644 --- a/src/entt/entity/view.hpp +++ b/src/entt/entity/view.hpp @@ -88,7 +88,7 @@ public: filter{}, index{} {} - view_iterator(iterator_type first, std::array value, std::array excl, const std::size_t idx) noexcept + view_iterator(iterator_type first, stl::array value, stl::array excl, const std::size_t idx) noexcept : it{first}, pools{value}, filter{excl}, @@ -123,8 +123,8 @@ public: private: iterator_type it; - std::array pools; - std::array filter; + stl::array pools; + stl::array filter; difference_type index; }; @@ -238,7 +238,7 @@ protected: } } - basic_common_view(std::array value, std::array excl) noexcept + basic_common_view(stl::array value, stl::array excl) noexcept : pools{value}, filter{excl}, index{Get} { @@ -387,8 +387,8 @@ public: } private: - std::array pools{}; - std::array filter{}; + stl::array pools{}; + stl::array filter{}; const common_type *placeholder{internal::view_placeholder()}; size_type index{Get}; }; diff --git a/src/entt/meta/meta.hpp b/src/entt/meta/meta.hpp index 42a925fcb..62806e72f 100644 --- a/src/entt/meta/meta.hpp +++ b/src/entt/meta/meta.hpp @@ -1014,7 +1014,7 @@ struct meta_func: meta_object { template // NOLINTNEXTLINE(modernize-use-nodiscard) meta_any invoke(Instance &&instance, Args &&...args) const { - return invoke(stl::forward(instance), std::array{meta_any{*ctx, stl::forward(args)}...}.data(), sizeof...(Args)); + return invoke(stl::forward(instance), stl::array{meta_any{*ctx, stl::forward(args)}...}.data(), sizeof...(Args)); } /*! @copydoc meta_data::traits */ @@ -1385,7 +1385,7 @@ public: */ template [[nodiscard]] meta_any construct(Args &&...args) const { - return construct(std::array{meta_any{*ctx, stl::forward(args)}...}.data(), sizeof...(Args)); + return construct(stl::array{meta_any{*ctx, stl::forward(args)}...}.data(), sizeof...(Args)); // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) } @@ -1451,7 +1451,7 @@ public: template // NOLINTNEXTLINE(modernize-use-nodiscard) meta_any invoke(const id_type id, Instance &&instance, Args &&...args) const { - return invoke(id, stl::forward(instance), std::array{meta_any{*ctx, stl::forward(args)}...}.data(), sizeof...(Args)); + return invoke(id, stl::forward(instance), stl::array{meta_any{*ctx, stl::forward(args)}...}.data(), sizeof...(Args)); } /** diff --git a/src/entt/meta/node.hpp b/src/entt/meta/node.hpp index 117a4df3b..5a4dbe09c 100644 --- a/src/entt/meta/node.hpp +++ b/src/entt/meta/node.hpp @@ -190,7 +190,7 @@ const meta_type_node &resolve(const meta_context &) noexcept; template [[nodiscard]] const meta_type_node &meta_arg_node(const meta_context &context, type_list, const std::size_t index) noexcept { using resolve_type = const meta_type_node &(*)(const meta_context &) noexcept; - constexpr std::array list{&resolve>...}; + constexpr stl::array list{&resolve>...}; ENTT_ASSERT(index < sizeof...(Args), "Out of bounds"); return list[index](context); } diff --git a/src/entt/stl/array.hpp b/src/entt/stl/array.hpp index 5415cce9a..3fbbcc975 100644 --- a/src/entt/stl/array.hpp +++ b/src/entt/stl/array.hpp @@ -6,6 +6,8 @@ /*! @cond ENTT_INTERNAL */ namespace entt::stl { +using std::array; + } // namespace entt::stl /*! @endcond */ diff --git a/src/entt/tools/davey.hpp b/src/entt/tools/davey.hpp index bc64344b4..2afa3d1f8 100644 --- a/src/entt/tools/davey.hpp +++ b/src/entt/tools/davey.hpp @@ -197,7 +197,7 @@ static void present_entity(const meta_ctx &ctx, const Entity entt, const It from template static void present_view(const meta_ctx &ctx, const basic_view, exclude_t> &view, std::index_sequence) { using view_type = basic_view, exclude_t>; - const std::array range{view.template storage()...}; + const stl::array range{view.template storage()...}; for(auto tup: view.each()) { const auto entt = std::get<0>(tup);