I just noticed that the FDIS (and at least some older drafts) includes

specifications for next and prev funtions on iterators. They're just

shorthands for calls to advance:

template <class ForwardIterator>

ForwardIterator next(ForwardIterator x,

typename std::iterator_traits<ForwardIterator>::difference_ type n = 1);

Effects: Equivalent to advance(x, n); return x;

template <class BidirectionalIterator>

BidirectionalIterator prev(BidirectionalIterator x,

typename std::iterator_traits<BidirectionalIterator>::diffe rence_type n

= 1);

Effects: Equivalent to advance(x, -n); return x;

Does anybody happen to know the motivation for putting these functions

in the new standard?

Thanks,

Scott

--

* C++ and Beyond: Meyers, Sutter, & Alexandrescu, Aug 7-10 in Banff

(

http://cppandbeyond.com/)