fork(17) download
#include <functional>

void foo(double){}

struct foo_functor{
  void operator()(float) const{}
};

int main(){
  std::function<void(int)> f1(foo), f2((foo_functor()));
  f1(5);
  f2(6);
}
Success #stdin #stdout 0s 3012KB
stdin
Standard input is empty
stdout

Standard output is empty