Boost logo

Boost :

Subject: Re: [boost] [range] RFC: span(iterator, size)
From: Evgeny Panasyuk (evgeny.panasyuk_at_[hidden])
Date: 2013-10-30 04:59:47


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

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk