1 2 3 4 5 6 7 8 9 10
struct A { private: A(A const&) {} }; A f(); int main() { A const &ref = f(); }
1 2 3
In function 'int main()': Line 3: error: 'A::A(const A&)' is private compilation terminated due to -Wfatal-errors.