Does boost::bind() copy parameters by reference or by value?

By value. 1 But you can make it copy by ref instead: void SomeFunction(const int& value) { boost::bind(…, boost::ref(value)); boost::bind(…, boost::cref(value)); // by const ref } 1 http://www.boost.org/doc/libs/1_46_1/libs/bind/bind.html#Purpose a copy of the value of i is stored into the function object. boost::ref and boost::cref can be used to make the function object store a reference … Read more

Difference between C++11 std::bind and boost::bind

boost::bind has overloaded relational operators, std::bind does not. boost::bind supports non-default calling conventions, std::bind is not guaranteed to (standard library implementations may offer this as an extension). boost::bind provides a direct mechanism to allow one to prevent eager evaluation of nested bind expressions (boost::protect), std::bind does not. (That said, one can use boost::protect with std::bind … Read more