#include <iostream> using namespace std; struct X { X() {} X(X&&) {} }; int main() { X a; X b = a; }
Standard input is empty
prog.cpp: In function ‘int main()’:
prog.cpp:16:8: error: use of deleted function ‘constexpr X::X(const X&)’
X b = a;
^
prog.cpp:4:8: note: ‘constexpr X::X(const X&)’ is implicitly declared as deleted because ‘X’ declares a move constructor or move assignment operator
struct X
^
Standard output is empty