Boost logo

Boost Users :

From: Grisha Spivak (rustedstranger_at_[hidden])
Date: 2006-05-14 16:04:30


David Abrahams <dave <at> boost-consulting.com> writes:

>
> We didn't think of it
>
> http://www.boost.org/libs/iterator/doc/iterator_facade.html#operator
>
> explains why operator[] returns a proxy. You can write:
>
> int x = it[5];
> it[3] = x;
>
> to work around this problem.
>

Thanks,

I'm just learning how to use boost.iterator library to make some of my code
more generic. Maybe construction like "it[3] = it[5];" will not be used, but
anyways it's result looks unintuitive.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net