
Thorsten Ottosen <thorsten.ottosen <at> dezide.com> 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. Test project is this one: #include <boost/noncopyable.hpp> #include <boost/ptr_container/ptr_vector.hpp> class A : public boost::noncopyable { public: A() {} }; int _tmain(int argc, _TCHAR* argv[]) { boost::ptr_vector<A> lst; // lst.sort([&] (const A& v1, const A& v2) ->bool {return false;}); lst.sort([] (const A* v1, const A* v2) ->bool {return false;}); return 0; }