I have a custom container class for which I'd like to write the iterator
and const_iterator
classes.
I never did this before and I failed to find an appropriate how-to. What are the guidelines regarding iterator creation, and what should I be aware of ?
I'd also like to avoid code duplication (I feel that const_iterator
and iterator
share many things; should one subclass the other ?).
Thanks.
Foot note: I'm pretty sure Boost has something to ease this but I can't use it here, for many stupid reasons.