id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 923,Request extended next() for utility lib,nobody,nobody,"{{{ The standard library's ""advance(it, n)"" algorithm is often awkward to use because it takes the ""it"" argument by reference. At times I want to access the n-th element in a sequence, where I don't know if the iterator is random-access or not (e.g., a generic algorithm where the iterator type is only required to be a model of ForwardIterator) and the O(n) time for advance with a non-random-access iterator is a negligible contribution to the overall runtime of the algorithm. Using advance, I have to write something like this: IteratorType it = foo.begin(); advance(it, n); f(*it); If the iterator type is complicated, the above is rather awkward. I would like to instead write f(*next(it, n)); where the overloaded next() is defined something like this: template ForwardIterator next(ForwardIterator it, Distance n) { advance(it, n); return it; } }}}",Feature Requests,closed,,None,None,,Accepted,,