diff --git a/include/cserver/engine/components.hpp b/include/cserver/engine/components.hpp index 8236930..5c7b43c 100644 --- a/include/cserver/engine/components.hpp +++ b/include/cserver/engine/components.hpp @@ -278,9 +278,11 @@ consteval auto TopologicalSort(const DependencyGraph(Tuple&& tuple){ static constexpr auto Size = utempl::kTupleSize; - return [&](std::index_sequence) -> std::array { - return {Find(names, Get(std::forward(tuple)))...}; - }(std::make_index_sequence()); + return utempl::Unpack(std::forward(tuple), + [&](Args&&... args) -> std::array { + return {Find(names, std::forward(args))...}; + } + ); }); constexpr auto Size = utempl::kTupleSize; const std::array adj = utempl::Map(storage,