
4 Dec
2012
4 Dec
'12
11:02 p.m.
Hello, Can someone please explain why a cref is needed in the last line of the attached code snippet? Thank you, Chris === #include <boost/bind.hpp> #include <boost/function.hpp> using boost::bind; using boost::cref; using boost::function; void a() { } void b(function<void()>) { } void f() { //bind(b, bind(a)); bind(b, cref(bind(a))); }