Boost logo

Boost Users :

Subject: [Boost-users] [lambda]
From: Marcin Zalewski (marcin.zalewski_at_[hidden])
Date: 2010-02-25 23:26:12


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...

Cheers,
Marcin

[1] http://www.boost.org/doc/libs/1_42_0/doc/html/lambda/le_in_details.html#lambda.construction_and_destruction
[2] http://www.boost.org/doc/libs/1_42_0/libs/fusion/doc/html/fusion/functional/adapters/fused.html


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