fork(1) download
  1. #include <string>
  2.  
  3. template <typename A>
  4. void test_template(A a1, A a2)
  5. {
  6. }
  7.  
  8. int main(int argc, char const *argv[])
  9. {
  10. test_template(1ULL, 1UL);
  11. return 0;
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main(int, const char**)’:
prog.cpp:10:25: error: no matching function for call to ‘test_template(long long unsigned int, long unsigned int)’
  test_template(1ULL, 1UL);
                         ^
prog.cpp:10:25: note: candidate is:
prog.cpp:4:6: note: template<class A> void test_template(A, A)
 void test_template(A a1, A a2)
      ^
prog.cpp:4:6: note:   template argument deduction/substitution failed:
prog.cpp:10:25: note:   deduced conflicting types for parameter ‘A’ (‘long long unsigned int’ and ‘long unsigned int’)
  test_template(1ULL, 1UL);
                         ^
stdout
Standard output is empty