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