fork(43) download
  1. #include <functional>
  2.  
  3. void foo(double){}
  4.  
  5. struct foo_functor{
  6. void operator()(float) const{}
  7. };
  8.  
  9. int main(){
  10. std::function<void(int)> f1(foo), f2((foo_functor()));
  11. f1(5);
  12. f2(6);
  13. }
  14.  
Success #stdin #stdout 0s 3012KB
stdin
Standard input is empty
stdout
Standard output is empty