
28 Jul
2009
28 Jul
'09
9:11 p.m.
Andrei Alexandrescu wrote:
Now here comes an interesting possibility. Boost::RangeEx also defines a typename Boost::RangeEx::iterator, and begin() and end() that return iterators. But it makes them optional! Meaning, as much as there are forward vs. bidirectional ranges, there are ranges that cloak iterators versus ranges that don't.
Would there be any reason for a range not to provide iterators except those iterators being hard to write? In case there is none, I don't think it's such a good idea to use concept refining for a non conceptual difference, but rather an implementation difficulty.