fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class A {
  5. public:
  6. A() { cout << "Created\n"; }
  7.  
  8. A(const A & a) = delete;
  9. };
  10.  
  11. void kek(A a) {
  12. cout << "keked";
  13. }
  14.  
  15. int main() {
  16. // your code goes here
  17. A a = A();
  18.  
  19. return 0;
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:17:10: error: use of deleted function 'A::A(const A&)'
  A a = A();
          ^
prog.cpp:8:2: note: declared here
  A(const A & a) = delete;
  ^
stdout
Standard output is empty