11 Nov
2011
11 Nov
'11
12:52 p.m.
I am trying to figure out if c++11 lambda can be used instead of the straight preducates. say, I have class A : public boost::noncopyable { ... } and boost::ptr_vector<A> lst; I'd like to use something like: lst.sort([&] (const A& v1, const A& v2) ->bool {return v1 < v2;}); Tutorial for ptr_vector says that predicates are wrapped in indirect_fun. May be this is the reason the sort fails to compile?