#include <iostream> using namespace std; void f(unsigned char) { cout << "f(u)\n"; } void f(char) = delete; int main() { char a = 'a'; unsigned char b = 0x42; f(a); f(b); }
Standard input is empty
prog.cpp: In function ‘int main()’:
prog.cpp:11:5: error: use of deleted function ‘void f(char)’
f(a);
^
prog.cpp:5:6: note: declared here
void f(char) = delete;
^
Standard output is empty