Skip to content

Commit

Permalink
Merge branch 'feat/cartesian-product-and-with' of https://github.com/…
Browse files Browse the repository at this point in the history
…isaacy2012/flux into feat/cartesian-product-and-with
  • Loading branch information
isaacy2012 committed Jan 29, 2024
2 parents 01fad2d + 91903c2 commit 6f6af8e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 4 additions & 2 deletions include/flux/op/cartesian_power_map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ struct cartesian_power_map_fn

} // namespace detail

template <std::size_t PowN>
FLUX_EXPORT inline constexpr auto cartesian_power_map = detail::cartesian_power_map_fn<PowN>{};
FLUX_EXPORT
template <distance_t N>
requires (N >= 0)
inline constexpr auto cartesian_power_map = detail::cartesian_power_map_fn<N>{};

} // namespace flux

Expand Down
10 changes: 4 additions & 6 deletions include/flux/op/cartesian_product.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,17 @@ struct cartesian_product_adaptor
FLUX_NO_UNIQUE_ADDRESS std::tuple<Bases...> bases_;

public:
constexpr explicit cartesian_product_adaptor(decays_to<Bases> auto&&... bases)
: bases_(FLUX_FWD(bases)...)
{}

using flux_sequence_traits = cartesian_traits_base<
sizeof...(Bases),
cartesian_kind::product,
read_kind::tuple,
Bases...
>;
friend flux_sequence_traits::impl;

constexpr explicit cartesian_product_adaptor(decays_to<Bases> auto&&... bases)
: bases_(FLUX_FWD(bases)...)
{}


};

struct cartesian_product_fn {
Expand Down

0 comments on commit 6f6af8e

Please sign in to comment.