Boost logo

Boost :

Subject: Re: [boost] [RangeEx] Using istream_range?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2008-10-22 12:06:22

Robert Jones wrote:

> But this code doesn't....

> vals | adaptors :: transformed( _1 * 2 ),

Without even testing, I assume that is because _1 * 2 does not allow the
result type to be extracted using result_of.
RangeEx forwards that to make_transform_iterator which requires it.

I personally overcame this issue by modifying the RangeEx library so
that it wraps the functor into another one that will define result_type
using typeof. That's a fairly ugly hack.
A better way might to be
- make result_of compatible with boost.lambda sig thingy, which might or
might not help in some cases
- allow boost.typeof to be used in result_of, in which cases result_of
will always work, albeit not reference-correctly.

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