
30 Oct
2013
30 Oct
'13
7:43 a.m.
30.10.2013 11:29, TONGARI J:
1. So, span(first, n) and span(next(first), n) will result in "equal" iterators? if you mean begin-or-end(span(first, n)) == begin-or-end(span(next(first), n)), then yes, but it's pathic.
Yes, that what I mean. This limitation should be placed as warning.
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? 2. Imagine if we have std::list x with 10 elements. Will dereference of end(span(begin(x), 5)) be undefined? -- Evgeny Panasyuk