The type a std::vector cannot work with classes with the protected copy-constructors.
class A{ public: explicit A(const A&){}; }; std::vector<A> v; A a; v.push_back(a); // an error Copy protection deleting solves a question. class B{ public: B(const B&){}; }; std::vector<B> w; B b; w.push_back(b); // good What is the matter? -- Summary: The type a std::vector cannot work with classes with the protected copy-constructors Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: lisp2d at lisp2d dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39463