Daily bit(e) of C++ | std::fill, std::generate
Daily bit(e) of C++ #391, The range-fill algorithms: std::fill and std::generate.
std::fill and std::generate are simple range-fill algorithms.
The std::fill algorithm fills the supplied range with copies of the provided value.
The std::generate algorithm fills the range with the results of successively invoking the provided callable.