
30 Sep
2011
30 Sep
'11
2:26 p.m.
template<typename I> auto f() { I i; assert(*i); } // worst algorithm ever
OTOH, if I know that a singular iterator of some type would have no valid operations, and the iterator is only meant to be used by algorithms, the benefit of being unable to create a singular iterator (like when the iterator in question holds a reference to supporting data used in its operation) outweighs the benefit of being able to do so.
I think I've lost the thread of the argument. Are you saying that you should *not* be able to default construct iterators?