fork(1) download
  1. #include <functional>
  2. #include <iostream>
  3.  
  4. void f(char a)
  5. {
  6. std::cout << "char";
  7. }
  8.  
  9. void f(int a)
  10. {
  11. std::cout << "int";
  12. }
  13.  
  14. int main()
  15. {
  16. // auto a = std::bind(f, 5); // HAHAHAHAHA FUCK YOU
  17. auto a = std::bind(static_cast<void(*)(int)>(f), 5);
  18. auto b = [](){ return f(5); };
  19. a();
  20. b();
  21. }
Success #stdin #stdout 0s 3140KB
stdin
Standard input is empty
stdout
intint