FAQ Database Discussion Community

Boost Bind to Method

I'm trying to use boost thread to multi-thread one of my applications. The part I have an issue with is the boost::bind. Here is what I am trying to do : boost::bind(&Class::CalculateRT(i, i - 1), RT)); Considering : RT is a TransformType typedef std::pair<Eigen::Matrix3d, Eigen::Vector3d> TransformType; And CalculateRT is a...

Passing a unique_ptr reference to boost::bind?

I'm on CentOS 6.6 (gcc 4.4.7) and developing with Boost.Asio (1.41). I'd like io_service to call member function run() in manger object m when it starts. The code I'm trying to compile looks like: #include <memory> #include <boost/asio.hpp> #include <boost/bind.hpp> boost::asio::io_service io; std::unique_ptr<manager> m; m = std::make_unique<manager>; io.post(boost::bind(&manager::run, &m)); gcc...