• generate() assigns the values that are generated by a call of op() to each element in the range [beg,end). • generate_n() assigns the values that are generated by a call of op() to the first num elements in the range starting with beg. If num is negative, generate_n() does nothing (specified only since C++11).