#include <functional>
void hello(int a)
{
std::cout<<a<<std::endl;
}
void call_when(int x,const std::function<void(int)> &f)
{
if(x == 0)
f(x);
}
auto pt = std::bind(hello,std::placeholders::_1);
call_when(0,pt);
#include <functional>
void hello(int a)
{
std::cout<<a<<std::endl;
}
void call_when(int x,const std::function<void(int)> &f)
{
if(x == 0)
f(x);
}
auto pt = std::bind(hello,std::placeholders::_1);
call_when(0,pt);