prog.cpp: In function 'X create_x()':
prog.cpp:19:12: error: use of deleted function 'X::X(const X&)'
return x;
^
prog.cpp:9:5: note: declared here
X(const X &other) = delete;
^
prog.cpp: In function 'int main()':
prog.cpp:23:23: error: use of deleted function 'X::X(const X&)'
auto x = create_x();
^
prog.cpp:9:5: note: declared here
X(const X &other) = delete;
^