Eric Niebler goes deeper into Iterator details in his new blog post
Iterators++, Pat 2
by Eric Niebler
From the article:
This is the third in a series about proxy iterators, the limitations of the existing STL iterator concept hierarchy, and what could be done about it. In the first post I explained what proxy iterators are (an iterator like vector<bool>‘s that, when dereferenced, returns a proxy object rather than a real reference) and three specific difficulties they cause in today’s STL:
- What, if anything, can we say in general about the relationship between an iterator’s value type and its reference type?
- How do we constrain higher-order algorithms like for_each and find_if that take functions that operate on a sequence’s elements?
- How do we implement algorithms that must swap and move elements around, like sort and reverse?
Add a Comment
Comments are closed.