Skip to content

Commit

Permalink
s/drop/cartesian_product_tuple_drop/ in the cartesian_product imp…
Browse files Browse the repository at this point in the history
…lementation

details to avoid confusing with `flux::drop`.
  • Loading branch information
brycelelbach committed Jul 31, 2023
1 parent 6958d51 commit fe8ff5d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/flux/op/cartesian_product.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,18 +210,19 @@ struct cartesian_product_traits_base {
};

template <typename T, std::size_t I, typename Is>
struct drop_impl;
struct cartesian_product_tuple_drop_impl;

template <typename T, std::size_t I, std::size_t... Js>
struct drop_impl<T, I, std::index_sequence<Js...>> {
struct cartesian_product_tuple_drop_impl<T, I, std::index_sequence<Js...>> {
using type = std::tuple<std::tuple_element_t<I + Js, T>...>;
};

template <typename T, std::size_t I>
using drop = typename drop_impl<T, I, std::make_index_sequence<std::tuple_size_v<T> - I>>::type;
using cartesian_product_tuple_drop =
typename cartesian_product_tuple_drop_impl<T, I, std::make_index_sequence<std::tuple_size_v<T> - I>>::type;

template <typename Self, std::size_t I>
using cartesian_product_partial_cursor_t = drop<cursor_t<Self>, I>;
using cartesian_product_partial_cursor_t = cartesian_product_tuple_drop<cursor_t<Self>, I>;

} // end namespace detail

Expand Down

0 comments on commit fe8ff5d

Please sign in to comment.