C++ Logo

sg16

Advanced search

Re: New revision of P2728

From: Tom Honermann <tom_at_[hidden]>
Date: Wed, 10 May 2023 16:32:03 -0500
On 5/10/23 4:05 PM, Corentin Jabot via SG16 wrote:
> Referring to the view in iterators is not uncommon - for example
> http://eel.is/c++draft/ranges#range.istream.iterator

Per [range.range]p5 <http://eel.is/c++draft/range.range#5>, iterators
produced from a borrowed range type (which utf_view is) are valid
independently of the lifetime of the range object that produced them.
Thus, such iterators cannot query their associated range object (but
they might be able to query the underlying range object if known and if
it is not a borrowed range).

Tom.

> For the bidirectional-at-most, there is a blurb
> http://eel.is/c++draft/ranges#range.iota.iterator-1 - I think Jonathan
> was wanting to factorise that out somewhere but right now you
> basically have to copy the blob

Received on 2023-05-10 21:32:05