
19 Feb
2013
19 Feb
'13
12:12 a.m.
c) shouldn't there be:
template<ForwardIteratorRange> class forward_iterator_range { ... };
...
template<RandomIteratorRange> class random_access_iterator_range : public { size_type size() const; };
...
Wouldn't restructuring interator_range along the lines of the above resolve all the confusion here?
Robert Ramey
It would solve Jonathan's problem, sure. But it would also hurt people who are trying to use iterator_range to package a pair of arbitrary iterators in generic code (which IMO is one of iterator_range's major use cases), because they would now have to use different classes for different types of iterators. Regards, Nate