fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void func(bool) {
  5. cout << "bool" << endl;
  6. }
  7. template <class T>
  8. void func(T) = delete;
  9. int main() {
  10. func(0);
  11. func(false);
  12. return 0;
  13. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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;
      ^
stdout
Standard output is empty