Please refer the following code snippet. I want to use the std::bind for overloaded function foobar. It calls only the method with no arguments.
std::bind
foobar
You need to use placeholders for the unbound arguments:
placeholders
auto a2 = std::bind(static_cast(&Client::foobar), cl, std::placeholders::_1); a2(5);
You can also perform the binding with a lambda capture (note that this is binds cl by reference, not by value):
cl
auto a2 = [&](int i) { cl.foobar(i); };