Boost logo

Boost :

Subject: Re: [boost] [Range] Range adaptor approach for temporary range lifetime issue
From: Michel Morin (mimomorin_at_[hidden])
Date: 2012-06-23 22:20:44

Jeffrey Lee Hellrung, Jr. wrote:
> What I mean is that currently,
> r | reversed
> returns a reverse_range<R> which stores its adapted range by reference
> (i.e., R&).

reverse_range<R> does not store the reference; it stores adapted iterators
(i.e. a pair of reverse_iterator<range_iterator<R>::type>).

> What if we introduced a metafunction that dictated what
> reverse_range<R> should store its adapted range by, either R& (most of the
> time) or R (in the case that the adapted range is a directly or indirectly
> a moved_range/by_value_range).

Do you mean reverse_range<R> stores reverse_forwarder and R
for the latter case?


Boost list run by bdawes at, gregod at, cpdaniel at, john at