#include <functional> typedef std::function<void(int)> TF1; typedef void(*FooFn)(int); typedef std::function<FooFn> TF2; int main() { TF1 tf1; TF2 tf2; return 0; }
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:10:9: error: aggregate ‘TF2 tf2’ has incomplete type and cannot be defined TF2 tf2; ^~~
Standard output is empty