#include <iostream> using namespace std; class X { int a; void operator=(X) = delete; }; int main() { X a, b; a = b; // your code goes here return 0; }
Standard input is empty
prog.cpp: In function 'int main()': prog.cpp:6:8: error: 'void X::operator=(X)' is private void operator=(X) = delete; ^ prog.cpp:14:4: error: within this context a = b; ^ prog.cpp:14:4: error: use of deleted function 'void X::operator=(X)' prog.cpp:6:8: note: declared here void operator=(X) = delete; ^
Standard output is empty