Boost logo

Boost Users :

From: Anders Sundman (sundman.anders_at_[hidden])
Date: 2008-05-19 02:57:34


Hi!

After recently discovering the the Fusion library I've been playing
around with it for a bit. It's pretty awesome.

There is however one thing I haven't been able to figure out. How do
you use it with lambda expressions?

E.g.
t1 & t1 are tuples of doubles
fusion::transform(t1, t2, std::minus<double>()) // Works fine
fusion::transform(t1, t2, lambda::_1 - lambda::_2) // Doesn't work

I'm not sure I understand the problem correctly, but it seems to be
related to boost::result_of. For some reason the lambda functor
doesn't seem to define it's return type (F::template result<FArgs>)?

Am I doing something wrong or is this a known awkwardness? If so, are
there any convenient workarounds?

Best Regards,
Anders Sundman


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