On Mon, 07 Oct 2002 09:53:09 -0700
Andy Ross <[EMAIL PROTECTED]> wrote:

> Bernie Bright wrote:
> > Only random access iterators support the '+' operator.  Fortunately
> > std::vector and std::deque provide just such iterators.
> 
> I thought there was a variant that supported incrementation but not
> decrementation.  You don't need the full-on random access variant in
> this case.  That's defined as supporting the '[]' operator; '+' is
> useful without random access (walking a linked list, for example).
> 

Maybe you're thinking of the ++ and -- operators.  All iterator categories support the 
++ operator, bidirectional and random access iterators add support for pre and post 
decrement, and random access iterators support "iterator arithmetic".

There is also the advance(iter,n) function that provides some additional 
random-access-like capabilites.

But I digress.

Bernie 

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to