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



--- Comment #11 from Geoff Romer <gromer at google dot com> 2012-12-18 21:59:23 
UTC ---

>From discussion on the C++ LWG reflector, it appears that the standard's

requirements on library types are intended to apply only during their lifetime,

although the standard does not currently make this clear. LWG 2224

(http://cplusplus.github.com/LWG/lwg-active.html#2224) is tracking this issue,

and its resolution should give a definitive answer.



That being the case, the old behavior was not a bug, but conformant with the

the intent of the standard (if not the precise wording). The new behavior is

conformant as well, of course, so it's up to you whether to revert the changes;

I just wanted to document for future reference that ~unique_ptr is in fact

permitted to modify the stored pointer before invoking the deleter, so this bug

report should not be an obstacle to e.g. having ~unique_ptr store a poison

value in order to catch client bugs.

Reply via email to