fork download
  1. void function(int i);
  2. void function(char i) = delete;
  3. int main(){
  4.  
  5. int i(5);
  6. function(i); //<- this is acceptable
  7.  
  8. char c('a');
  9. function(c); //<- I would NOT like this to compile
  10. }
  11.  
  12. void function(int i){return;}
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:2:6: error: deleted function 'void function(char)'
prog.cpp:9:15: error: used here
stdout

Standard output is empty