Boost logo

Boost :

From: shunsuke (pstade.mb_at_[hidden])
Date: 2007-11-22 20:16:56


Joel de Guzman wrote:
>> No. By the standard, `result<F(int)>` means that rvalue is passed,
>> and `result<F(T&)>` means that lvalue is passed.
>
> Exactly! And, again, `deref` uses `result<F(T&)>` --as expected.

I should say Yes! :-)
BTW, result<F(int)> may be called from deref in case of sequence of rvalues.

>>>> But, as_vector applied to transform_view uses `result_of` in a strange manner
>>>> through value_of.
>>>>
>>>> A FunctionObject for transform_view requires two result_of implementations;
>>>> It seems impossible.
>>> I provided an example, didn't I?
>> That doesn't work with rvalues.
>
> Of course it does :-) Did you try it? The example I attached (in the
> trac ticket) can even work with mpl::vector.

Ah, yes. I said about `f` in this thread.

> Again, see fusion zip.

My range zipper is used like this:
   `my_zip(fusion::make_list(std::string("abc"),std::string("123"))`.

Again, I place this simple question:

When at_c return type Sequence of input is:

    int&, char, double const&, ...

, how can I create

    fusion::vector<result_of<F(int&)>::type, result_of<F(char)>::type, result_of<F(double
const&)>::type, ...>

?

Regards,

-- 
Shunsuke Sogame

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