30 Oct
2013
30 Oct
'13
8:59 a.m.
30.10.2013 12:18, TONGARI J: >>>> Especially you mentioned that you plan to preserve same range category as >>>> original iterator has - what about BidirectionalIterators? >>> That's my mistake, they should be ForwardIterators. >> 1. What about RandomAccessIterators? > For RandomAccessIterators, 'span' will return the iterator as is, no > wrapping. So, you are talking about following mapping: Original | Wrapped _____________________________ Input | Input Forward | Forward Bidirectional | Forward RandomAccess | RandomAccess + dereference of end of returned will be undefined (even if it was legal in "original" range). + comparison of iterators from different span(..) invocations (with different args) on same range will be also undefined. Ok, I thought maybe you are talking about something more generally applicable. -- Evgeny Panasyuk