fork download
  1. #include <functional>
  2. #include <iostream>
  3.  
  4. typedef void (*VF)();
  5.  
  6. VF Test() {
  7. return nullptr;
  8. }
  9.  
  10. int main(int argc, char* argv[]) {
  11. std::function<void()> foo(Test());
  12. std::cout << !!foo << std::endl;
  13. return 0;
  14. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
1