Boost logo

Boost :

Subject: Re: [boost] [iterator] function_output_iterator constructed from a lambda function is not assignable
From: Paul Fultz II (pfultz2_at_[hidden])
Date: 2016-02-14 22:08:14


>
> This should arguably be built into the iterators themselves; I think that
> this has come up before on the list, but I don't remember the outcome of
> the
> discussion.
>

The problem is that there is overhead from using `boost::optional` in all
iterators. A better approach is to create fat ranges rather than fat
iterators. So instead the function object is stored in the range, and the
iterators reference the function from the range. Fat ranges also fixes the
problem with dealing with temporary ranges as well. This is the approach
that
Eric Niebler uses for his ranges-v3, and the reason why he started writing
the
library:

http://ericniebler.com/2013/11/07/input-iterators-vs-input-ranges/

Paul

 

>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


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