[Bug c++/39463] New: The type a std::vector cannot work with classes with the protected copy-constructors
lisp2d at lisp2d dot net
gcc-bugzilla@gcc.gnu.org
Sat Mar 14 20:58:00 GMT 2009
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
More information about the Gcc-bugs
mailing list