Boost logo

Boost :

Subject: Re: [boost] [Range] Range adaptor approach for temporary range lifetime issue
From: Dave Abrahams (dave_at_[hidden])
Date: 2012-06-17 15:48:17

on Sun Jun 17 2012, Michel Morin <> wrote:

> Side note:
> * There is also a fully automatic approach (i.e. when an rvalue range
> is adapted,
> `moved_range` is automatically used without piping it to `moved` adaptor).
> But this approach incurs unnecessary overhead when passing them to functions,
> because function arguments do not have the lifetime issue and we don't need
> to use `moved_range`. So I prefer the "manual" approach.

Could you illustrate this with an example? I'd like to understand the
trade-off you're making.


Dave Abrahams
BoostPro Computing

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