Den 11-11-2011 15:30, qplace skrev:
Thorsten Ottosen
writes: Could be. What does the error message say?
I'm thinking that the lambda function is not properly converted to a pointer to a function.
An escape route may be to use std::sort() with a lambda taking two void*.
-Thorsten
The first error is: 1>c:\libraries\boost\boost_1_47_0\boost\utility\result_of.hpp(79): error C2903: 'result' : symbol is neither a class template nor a function template
changing to void* results in the same error.
I'm saying use std::sort() with void* arguments.
// lst.sort([&] (const A& v1, const A& v2) ->bool {return false;}); lst.sort([] (const A* v1, const A* v2) ->bool {return false;});
The first one is the correct one. But I think the problem is with
indirect_fun, or the code surrounding it. Does this work:
auto x = <lambda>;
boost::indirect_fun