Why does std::function can implicit convert to a std::function which has more parameter? – CentOS
I have the following: void print_str(std::shared_ptr<std::string> str) { std::cout << str->c_str() << std::endl; } int main() { auto str = std::make_shared<std::string>("Hello"); std::function<void()> f = std::bind(print_str, str); f(); // correctly print: Hello return 0; } I think the type of std::bind(print_str,…