Lambda and Fusion: result_of problems
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
Anders Sundman wrote:
Am I doing something wrong or is this a known awkwardness? If so, are there any convenient workarounds?
How about including this: http://tinyurl.com/57fwzr The filename at line84 has to be modified, though. Regards, -- Shunsuke Sogame
On Tue, May 20, 2008 at 12:55 AM, shunsuke <pstade.mb@gmail.com> wrote:
Anders Sundman wrote:
Am I doing something wrong or is this a known awkwardness? If so, are there any convenient workarounds?
How about including this: http://tinyurl.com/57fwzr The filename at line84 has to be modified, though.
Your suggested file does indeed seem to fix my problem. Thank you for you help with that. I'm still a bit puzzled by the fact that this file is not a part of the lambda library. IMHO library interoperability is important in the general case, and library interoperability in boost should be a given. I'll keep my fingers crossed that this (dare I say bug?) gets fixed in the next release. Best Regards, Anders Sundman
participants (2)
-
Anders Sundman
-
shunsuke