Skip to content

Commit

Permalink
Remove use of constexpr tuples in flatten
Browse files Browse the repository at this point in the history
  • Loading branch information
Paulin Dussautoir authored and Paulin Dussautoir committed Aug 20, 2024
1 parent 6f71e85 commit f12ebb1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions include/upd/detail/variadic/flatten.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,13 @@ struct flatten<std::tuple<Tuple_Ts...>> {
return retval;
}

constexpr static auto aggregated = aggregate(std::index_sequence_for<Tuple_Ts...>{});

template<std::size_t... Is>
[[nodiscard]] constexpr static auto concat(std::index_sequence<Is...>) noexcept {
auto aggregated = aggregate(std::index_sequence_for<Tuple_Ts...>{});
return std::tuple<std::remove_pointer_t<decltype(aggregated.at(integral_constant_v<Is>))>...>{};
}

constexpr static auto concatenation = concat(std::make_index_sequence<sum_v<size_ts>>{});

using type = std::remove_const_t<decltype(concatenation)>;
using type = std::remove_const_t<decltype(concat(std::make_index_sequence<sum_v<size_ts>>{}))>;
};

template<typename... Tuple_Ts>
Expand Down

0 comments on commit f12ebb1

Please sign in to comment.