fork(2) download
  1. #include <functional>
  2.  
  3. typedef std::function<void(int)> TF1;
  4.  
  5. typedef void(*FooFn)(int);
  6. typedef std::function<FooFn> TF2;
  7.  
  8. int main() {
  9. TF1 tf1;
  10. TF2 tf2;
  11. return 0;
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:10:9: error: aggregate ‘TF2 tf2’ has incomplete type and cannot be defined
     TF2 tf2;
         ^~~
stdout
Standard output is empty