Revisions to iterator requirements - status?

K

Kevin McCarty

Hi clc++,

Does anyone know anything about the status of the new iterator
requirements that have been proposed, e.g. in N2758 / N2777 papers or
at the Boost website [1], [2]? It looks like essentially nothing has
happened with this since concepts were dropped from C++0x. Did folks
give up?

[1] http://www.boost.org/doc/libs/1_51_0/libs/iterator/doc/new-iter-concepts.html
[2] http://www.boost.org/doc/libs/1_51_0/libs/iterator/doc/facade-and-adaptor.html

The last paper I can find regarding changes to iterators for C++ 2011
is N3066, which fixes some minor issues but in particular still does
NOT allow for most random-access "transform" or "proxy" iterators. I
also double-checked the latest standard draft N3337, and it looks like
ForwardIterators still require that
iterator_traits<ForwardIter>::reference is a real reference. (24.2.5,
forward.iterators)

It's rather disappointing that even in C++ 2011, I still can't legally
define a random-access iterator class whose reference typedef (and
return type of unary operator*()) is 'int' rather than 'const int &'.
And indeed the standard still contradicts itself as to whether or not
std::vector<bool>::iterator is random-access; this actual issue was
mentioned in N3066 but it apparently did not propose a fix.

Thanks in advance to anyone who has more information,
- Kevin B. McCarty
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top