Struct assign_fn

Struct Documentation

struct assign_fn

Implementation detail for an assign range adaptor object.

Public Functions

template<class Range, class Fn, std::enable_if_t<ranges::range<Range>, int> = 0, std::enable_if_t<is_range_closure_v<Fn>, int> = 0>
inline constexpr auto operator()(Range &range, Fn fn) const -> Range&

Overload that implements the assign algorithm.

Friends

template<class Fn, std::enable_if_t<is_range_closure_v<Fn>, int> = 0>
inline friend constexpr auto operator|(Fn fn, assign_fn)

Hidden friend operator overload that enables action / view composition.

Enables the following expressions: 1) view_closure | assign 2) action_closure | view_closure | assign 3) action_closure | assign

1) Will create an action closure that can eagerly invoke view_closure and assign the resulting range to the input range. 2) Will create a new action closure that can invoke action_closure, eagerly invoke view_closure, and assign the resulting range to the input range. 3) Technically a no-op, it will just invoke the action_closure.