Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::ptr_vector::sort with c++11 lambdas
From: Michel Morin (mimomorin_at_[hidden])
Date: 2011-11-11 11:24:34


The following code compiles fine.
Is this what you want?

#define BOOST_RESULT_OF_USE_DECLTYPE

#include <boost/noncopyable.hpp>
#include <boost/ptr_container/ptr_vector.hpp>

class A : public boost::noncopyable
{
public:
    A() {}
};

int main (int argc, char* argv[])
{
    boost::ptr_vector<A> lst;
    lst.sort([&] (const A& v1, const A& v2) ->bool {return false;});

    return 0;
}

Regards,
Michel


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