cpp/algorithm/generate n

@1@ Assigns values, generated by given function object, to the first elements in the range beginning at , if. Does nothing otherwise.

@2@ Same as, but executed according to.

Complexity
Exactly invocations of  and assignments.