fork download
  1. #include <iostream>
  2.  
  3. template <class T>
  4. void f(T const & t)
  5. {
  6. std::cout << "in template: " << t << std::endl;
  7. }
  8.  
  9. void f(int) = delete;
  10.  
  11. int main()
  12. {
  13. f(10.);
  14. f(1);
  15. return 0;
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:9:6: error: deleted function 'void f(int)'
prog.cpp:14:5: error: used here
stdout
Standard output is empty