In the New Iterator Concepts standard proposal, I am not able to decipher any useful difference between a Single Pass Iterator and a Forward Traversal Iterator.
Does the "Assertion/Note" for the "++r" row in the Forward Traversal table imply that Forward Traversal Iterators are copyable, whereas Single Pass Iterators are not?
Additionally, why does the additional ability to default-construct make an iterator model Forward Traversal? What's the rationale?
The idea of the Single Pass Iterator is that it has less requirements than a Forward Traversal iterator. That makes it possible to create one for some cases where multi pass just isn't possible.
Think console input. Even if you could make a copy of the iterator, that wouldn't help you retrieve old keyboard input.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With