fork download
  1. struct X { X(X and) = default; X() = default; };
  2.  
  3. int main()
  4. {
  5. X a, b;
  6. b = a;
  7. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:6:4: error: use of deleted function 'X& X::operator=(const X&)'
  b = a;
    ^
prog.cpp:1:8: note: 'X& X::operator=(const X&)' is implicitly declared as deleted because 'X' declares a move constructor or move assignment operator
 struct X { X(X and) = default; X() = default; };
        ^
stdout
Standard output is empty