fork(5) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template <class T>
  5. T GetVal(int a, T b)
  6. {
  7. return b + 1;
  8. }
  9.  
  10. int main() {
  11. cout << GetVal<long long>(1, 2) << endl;
  12. cout << GetVal(1,int(3)) << endl;
  13. cout << GetVal(1,char(52)) << endl;
  14. cout << GetVal(1,52ll) << endl;
  15. return 0;
  16. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
3
4
5
53