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

--- Comment #3 from Geoff Romer <gromer at google dot com> ---
What's the standard of review here? If we can only assert on undefined
behavior, even in debug mode, then this just can't be done (although maybe we
should make this undefined in the Standard). If we can assert on behavior
that's technically well-defined, but very likely to lead to undefined behavior,
and very far from accepted usage norms, then I think this is OK (even for
custom deleters). The kinds of uses you're concerned about (e.g. using
p.reset(p.get()) to invoke some operation on *p) seem really marginal to me.

Reply via email to