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++/54351] ~unique_ptr() should not set __p to null


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54351

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-08-22 18:43:47 UTC ---
Hmm, the behaviour was probalby correct prior to fixing PR 43183, as the old
implementation of reset() did exactly what is required of the destructor.

However, the lifetime of the unique_ptr ends when the destructor starts
([basic.life]/1) so I don't believe it is legitimate to access it at that
point.


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