Container‐based version of the <algorithm> std::generate() function to assign a container's elements to the values provided by the given generator.

Synopsis

Declared in <absl/algorithm/container.h>

template<
    typename C,
    typename Generator>
constexpr
void
c_generate(
    C& c,
    Generator&& gen);

Parameters

Name

Description

c

The container to fill.

gen

The generator invoked to produce each value.

Created with MrDocs