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.
Compiler Explorer link: https://compiler-explorer.com/z/7dK1h9PPs