diff --git a/include/flux/op/cartesian_product.hpp b/include/flux/op/cartesian_product.hpp index ab1707fe..e4fa23dd 100644 --- a/include/flux/op/cartesian_product.hpp +++ b/include/flux/op/cartesian_product.hpp @@ -256,10 +256,10 @@ struct sequence_traits> } template + typename... PartialElements> static constexpr auto for_each_while_impl(Self& self, Function&& func, - PartialCursor&&... partial_cursor) + PartialElements&&... partial_elements) -> std::tuple> { // We need to iterate right to left. @@ -268,7 +268,7 @@ struct sequence_traits> auto this_current = flux::for_each_while(std::get(self.bases_), [&](auto&& elem) { keep_going = std::invoke(func, - cursor_t(FLUX_FWD(partial_cursor)..., FLUX_FWD(elem))); + element_t(FLUX_FWD(partial_elements)..., FLUX_FWD(elem))); return keep_going; }); return std::tuple(keep_going, std::tuple(std::move(this_current))); @@ -278,7 +278,7 @@ struct sequence_traits> auto this_current = flux::for_each_while(std::get(self.bases_), [&](auto&& elem) { std::tie(keep_going, nested_current) = for_each_while_impl( - self, func, FLUX_FWD(partial_cursor)..., FLUX_FWD(elem)); + self, func, FLUX_FWD(partial_elements)..., FLUX_FWD(elem)); return keep_going; }); return std::tuple(keep_going,