#include <functional>
#include <iostream>
// one method
using callback = std::function<void()>;
// another method
//typedef std::function<void()> callback;
void f1()
{
std::cout << "a" << std::endl;
}
void call(callback f)
{
f();
}
int main(int argc,char** argv)
{
callback c1 = std::bind(&f1);
call(c1);
return 0;
}