struct X { X(const X&) = delete; }; void demo(const X& m) { auto f = [m](){}; }
Standard input is empty
prog.cpp: In function 'void demo(const X&)':
prog.cpp:5:11: error: use of deleted function 'X::X(const X&)'
auto f = [m](){};
^
prog.cpp:1:12: note: declared here
struct X { X(const X&) = delete; };
^
prog.cpp:5:17: error: use of deleted function 'demo(const X&)::<lambda()>::<lambda>(demo(const X&)::<lambda()>&&)'
auto f = [m](){};
^
prog.cpp:5:13: note: 'demo(const X&)::<lambda()>::<lambda>(demo(const X&)::<lambda()>&&)' is implicitly deleted because the default definition would be ill-formed:
auto f = [m](){};
^
prog.cpp:5:13: error: use of deleted function 'X::X(const X&)'
prog.cpp:1:12: note: declared here
struct X { X(const X&) = delete; };
^
Standard output is empty