This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/39463] New: The type a std::vector cannot work with classes with the protected copy-constructors
- From: "lisp2d at lisp2d dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Mar 2009 20:58:23 -0000
- Subject: [Bug c++/39463] New: The type a std::vector cannot work with classes with the protected copy-constructors
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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