function object
std::ranges::generate
- Header
<algorithm>- Draft
- [alg.generate]
- Scope
std::ranges- cppreference
- std::ranges::generate
Synopsis
inline constexpr /* implementation-defined */ generate = {};Call signatures
generate is a function object; these are its call operators as libycxx declares them, written as the functions the draft declares.
- (1)
template<class R, std::copy_constructible F> requires std::invocable<F&> && std::ranges::output_range<R, std::invoke_result_t<F&>> constexpr borrowed_iterator_t<R> generate(R&& r, F gen); - (2)
template< std::input_or_output_iterator O, std::sentinel_for<O> S, std::copy_constructible F> requires std::invocable<F&> && std::indirectly_writable<O, std::invoke_result_t<F&>> constexpr O generate(O first, S last, F gen);