bind first argument of function without knowing its arity
问题 I'd like to have a function BindFirst that binds the first argument of a function without me having to explicitly know/state the arity of the function by using std::placeholders. I'd like the client code to look something like that. #include <functional> #include <iostream> void print2(int a, int b) { std::cout << a << std::endl; std::cout << b << std::endl; } void print3(int a, int b, int c) { std::cout << a << std::endl; std::cout << b << std::endl; std::cout << c << std::endl; } int main()