This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/58159] unique_ptr::reset should have debug assertion for "self-reset"


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]