C++ Language/Std/Stl/Algorithms/ApplyingItemByItem/IgnoringPriorValues

Unlike the DoubleEach() example, this function ignores existing item-values: int Compute99() { return 99; }. The algorithm to use it is std::generate(v.begin(), v.end(), Compute99).

Additional information about item-by-item processing that ignores prior values (includes interactive examples)