This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/58159] unique_ptr::reset should have debug assertion for "self-reset"
- 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: Wed, 14 Aug 2013 17:43:29 +0000
- Subject: [Bug libstdc++/58159] unique_ptr::reset should have debug assertion for "self-reset"
- Auto-submitted: auto-generated
- References: <bug-58159-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58159
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I'm also a little concerned that doing a self-reset followed by release() is
indeed valid ... but probably rare enough that we can still assert anyway at
the time of the self-reset.
I think this is a good idea, but we should be careful to do it right.