I am confused with some concepts about defining my own iterator:
From this: http://www.cs.northwestern.edu/~riesbeck/programming/c++/stl-iterator-define.html, which
Although using std::iterator
may help with typedef
s, it certainly doesn't help with the actual implementation.
The Boost.Iterator library has lots of good things for this, and I'll suggest to read about the boost::iterator_adaptor which greatly reduce the amount of code you need to type to define a new iterator on top of an old one.