
14 May
2006
14 May
'06
8:04 p.m.
David Abrahams
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.