fork download
  1. #include <iostream>
  2.  
  3. template<typename R, typename... Args>
  4. void foo( R (*bar)(Args...))
  5. {
  6. }
  7.  
  8. template<typename F>
  9. void foo( F f)
  10. {
  11. foo(+f);
  12. }
  13.  
  14. int main()
  15. {
  16. foo([](int x, float y)
  17. {
  18. std::cout << x << " " << y << std::endl;
  19. }
  20. );
  21. return 0;
  22. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
Standard output is empty