#include <iostream> struct C { int x = 1; C() { } C(C&&) { } }; int main() { const C c; C c2(c); std::cout << c.x << " " << c2.x << std::endl; return 0; }
Standard input is empty
prog.cpp: In function 'int main()':
prog.cpp:19:11: error: use of deleted function 'constexpr C::C(const C&)'
C c2(c);
^
prog.cpp:3:8: note: 'constexpr C::C(const C&)' is implicitly declared as deleted because 'C' declares a move constructor or move assignment operator
struct C
^
Standard output is empty