fork(1) download
  1. #include <cstdio>
  2.  
  3. template <typename typed> typed f() { return f<void>(); return f<int>(); }
  4.  
  5. template <> int f() { return 2; }
  6. template <> double f() { return 2.7; }
  7.  
  8. int main(void) { return !printf("%d %f", f<int>(), f<double>()); }
  9.  
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
2 2.700000