Standard C++ Library User Guide and Tutorial

incremented. Using this object, the following call on the standard library function generate()
will initialize a vector of 20 elements with the values 1 through 20:
vector<int> aVec(20);
generate (aVec.begin(), aVec.end(), iotaGen(1));