ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

boost::bind() returns something that can be called like a function. It doesn't actually call the function.

In your first example, you should be able to reproduce the behavior with:

boost::bind(&show, boost::ref(letter))();

Or if you want it to call that function more than once (like the TF example does), you could do:

boost::function f = boost::bind(&show, boost::ref(letter));
f();
f();