I know how to fill an std::vector with non-trivial initial values, e.g. sequence numbers:
void IndexArray( unsigned int length, std::vector&a
There is also a iota() function in adobe.ASL, (and a value_iterator as well). In boost, there is a counting_iterator, and I suspect a few other ways to do generate number sequences on the fly in boost.
iota()