Defined in header <algorithm> template< class ForwardIt, class Generator >
void generate( ForwardIt first, ForwardIt last, Generator g );
Assigns each element in range [first, last) a value generated by the given function object g.
Parameters
first, last - the range of elements to generate g - generator function object that will be called. The signature of the function should be equivalent to the following:
Ret fun(); The type Ret must be such that