Guillaume Pothier wrote:
Dunno haven't see it, you forgot the attachment ;-)
ha! that's one of my favorites!
Here is the attachment corresponding to my first mail.
Lars begin() and end() solution seems sound.
Okay, what would be the return type? (sorry, my C++ is 10 years old)
Would it be vector<Buffer *>::const_iterator?
Yes but you'll probably also need also the non const type:
vector<Buffer *>::iterator begin();
vector<Buffer *>::const_iterator begin() const;
Or is there something more generic that hides the fact that the list
is backed by a vector?
I guess you could typedef the iterator within the BufferList class:
typedef vector<Buffer *>::iterator iterator;
typedef vector<Buffer *>::const_iterator const_iterator;