I cannot find out how to bind a parameter to an overloaded function using std::bind. Somehow std::bind cannot deduce the overloaded type (for its t
std::bind
You may use:
auto f_binder = std::bind(static_cast<double(&)(double)>(f), 2.);
or
auto f_binder = bind<double(double)>(f, 2.);
Alternatively, lambda can be used:
auto f_binder = []() { return f(2.); // overload `double f(double)` is chosen as 2. is a double. };