fork(1) download
  1. typedef long (*func)(int);
  2.  
  3. long function(int) { return 42; }
  4.  
  5. struct Test
  6. {
  7. static constexpr func f = &function;
  8. };
  9.  
  10. template<func c>
  11. struct Call
  12. {
  13. static void f()
  14. {
  15. c(0);
  16. }
  17. };
  18.  
  19. int main()
  20. {
  21. Call<Test::f>::f();
  22. }
Success #stdin #stdout 0s 2892KB
stdin
Standard input is empty
stdout
Standard output is empty