fork(3) download
  1. template <typename F>
  2. void f(F g = 10)
  3. {
  4. }
  5.  
  6.  
  7. int main()
  8. {
  9. f();
  10. return 0;
  11. }
  12.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:9:5: error: no matching function for call to 'f()'
   f();
     ^
prog.cpp:2:6: note: candidate: template<class F> void f(F)
 void f(F g = 10)
      ^
prog.cpp:2:6: note:   template argument deduction/substitution failed:
prog.cpp:9:5: note:   couldn't deduce template parameter 'F'
   f();
     ^
stdout
Standard output is empty