Boost logo

Boost Users :

Subject: Re: [Boost-users] [lambda]
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-02-26 10:36:28


AMDG

Marcin Zalewski wrote:
> I am trying to use lambda's constructor [1] with fusion's fused [2].
> Fused requires that the function object passed to it has a following
> valid expression:
>
> boost::result_of< F(T1 ...TN) >::type
>
> Unfortunately, constructor does not support result_of. Its
> implementation contains the following piece of code:
>
> template <class U> struct sig { typedef T type; };
>
> This happens to be exactly what's necessary for constructor to support
> result_of, but sig would have to be renamed to result.
>
> I guess I do not really have a question here but rather a request to
> make constructor compatible with result_of. There seems to be no
> reason not to do it, and I could not figure out a much nicer way to
> construct objects with fusion sequences than combining lambda's
> constructor and fusion's fused. It comes so close, but if only sig was
> result...
>

The problem is that Lambda came before result_of.
See also https://svn.boost.org/trac/boost/ticket/864

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net