fork(9) download
  1. #include<typeinfo>
  2. #include<cassert>
  3. #define LAMBDA [] (int i) -> long { return 0; }
  4. int main ()
  5. {
  6. long (*pFptr)(int) = LAMBDA; // ok
  7. auto pAuto = LAMBDA; // ok
  8. assert(typeid(pFptr) == typeid(pAuto)); // assertion fails !
  9. }
Runtime error #stdin #stdout #stderr 0s 3456KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
prog: prog.cpp:8: int main(): Assertion `typeid(pFptr) == typeid(pAuto)' failed.