#include <iostream>
#include <functional>
void f(char const*str)
{
std::cout << str << std::endl;
}
int main()
{
void (*a)() (std::bind(f, "A"));
void (*b)() (std::bind(f, "B"));
(*a)();
(*b)();
(*a)();
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8ZnVuY3Rpb25hbD4KCnZvaWQgZihjaGFyIGNvbnN0KnN0cikKewogICAgc3RkOjpjb3V0IDw8IHN0ciA8PCBzdGQ6OmVuZGw7Cn0KCmludCBtYWluKCkKewogICAgdm9pZCAoKmEpKCkgKHN0ZDo6YmluZChmLCAiQSIpKTsKICAgIHZvaWQgKCpiKSgpIChzdGQ6OmJpbmQoZiwgIkIiKSk7CiAgICAoKmEpKCk7CiAgICAoKmIpKCk7CiAgICAoKmEpKCk7Cn0K
prog.cpp: In function ‘int main()’:
prog.cpp:11:35: error: cannot convert ‘std::_Bind_helper<false, void (&)(const char*), const char (&)[2]>::type {aka std::_Bind<void (*(const char*))(const char*)>}’ to ‘void (*)()’ in initialization
prog.cpp:12:35: error: cannot convert ‘std::_Bind_helper<false, void (&)(const char*), const char (&)[2]>::type {aka std::_Bind<void (*(const char*))(const char*)>}’ to ‘void (*)()’ in initialization