This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/77268] Vector erase call destructor for last element twice and doesn't call destructor for eased element.
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 16 Aug 2016 15:33:37 +0000
- Subject: [Bug libstdc++/77268] Vector erase call destructor for last element twice and doesn't call destructor for eased element.
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-77268-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77268
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Your test is completely broken, you need to define copy assignment operator to
prevent two objects referring to the same pointer (and deleting it twice).