Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-08-24 07:03:47


----- Original Message -----
From: <roland_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, August 24, 2001 12:25 AM
Subject: [boost] iterator_adaptor: non-const operator[] ?

> Hi all,
>
> is there a reason (I guess, so: which?) why iterator_adaptor
> just provides const operator[], i.e.
>
> value_type operator[](difference_type n) const
> { return *(*this + n); }
>
> but not the non-const version, something like
>
> reference operator[](difference_type n)
> { return *(*this + n); }
>
> Thanks,
>
> - Roland

See footnote 4 in the documentation.

> PS: I just saw that in the documentation some functions of
> default_iterator_policies are still declared static,
> whereas in the actual code they aren't.

Fixed in CVS, thanks. Also, there were a few 'const's missing.

-Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk