fork(1) download
  1. #include <iostream>
  2. #include <new>
  3. using namespace std;
  4.  
  5. struct T{
  6. ~T()=delete;
  7. };
  8.  
  9.  
  10. int main() {
  11. auto t=::new T;
  12. ::delete t;
  13. // your code goes here
  14.  
  15. T t1;
  16.  
  17. return 0;
  18. }
Compilation error #stdin compilation error #stdout 0s 3464KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:12:11: error: use of deleted function 'T::~T()'
  ::delete t;
           ^
prog.cpp:6:2: note: declared here
  ~T()=delete;
  ^
prog.cpp:15:4: error: use of deleted function 'T::~T()'
  T t1;
    ^
prog.cpp:6:2: note: declared here
  ~T()=delete;
  ^
stdout
Standard output is empty