fork download
  1. #include <iostream>
  2.  
  3. template <typename F>
  4. void foo(F func)
  5. {
  6. func(1);
  7. }
  8.  
  9. int main() {
  10. foo([](int i) { std::cout << i << std::endl; });
  11.  
  12. return 0;
  13. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
1