|
Boost : |
From: Peter Simons (simons_at_[hidden])
Date: 2002-09-12 05:23:33
While writing my custom iterator class, I discovered
<boost/operators.hpp> and found it to be quite useful. Now,
that I am polishing my code a bit, I would like to add a
const_xxx version of my iterator class, but am uncertain
what the best way to do that would be.
I thought of defining "const_my_custom_iterator" with only
const member functions, and then to derive the non-const
"my_custom_iterator" class from that, adding the non-const
member functions.
But how would would interact with
"boost::random_access_iterator_helper"? Must both classes
derive from the helper in this case?
Or is there an entirely different, better way, maybe using
the iterator adaptors?
Any comments would be highly appreciated.
-peter
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk