
Thorsten Ottosen <thorsten.ottosen@dezide.com> writes:
David Abrahams wrote:
Thorsten Ottosen <thorsten.ottosen@dezide.com> writes:
The new version will feature special functions for generating ranges for the string library. We could probably wrap char* iterators in boost::string_iterator<char>. Are you sure we need the end iterator to be a different type?
No, you don't, in fact. Comparisons just get a little more expensive than they'd need to be otherwise.
You mean more expensive because you have to see which irerator that is the valid one?
The checks are more complicated than that, but that's the general idea.
In that case it might be reasoable to always mandate the left argument to be the valid iterator:
No, that violates EqualityComparable, not to mention every reasonable person's expectations. -- Dave Abrahams Boost Consulting www.boost-consulting.com