#include <iostream> using namespace std; void func(bool) { cout << "bool" << endl; } template <class T> void func(T) = delete; int main() { func(0); func(false); return 0; }
Standard input is empty
prog.cpp: In function ‘int main()’:
prog.cpp:10:8: error: use of deleted function ‘void func(T) [with T = int]’
func(0);
^
prog.cpp:8:6: error: declared here
void func(T) = delete;
^
Standard output is empty