https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121180

--- Comment #4 from Halalaluyafail3 <luigighiron at gmail dot com> ---
(In reply to Andrew Pinski from comment #2)
> So is MSVC.  So maybe this is a defect in the standard ...

I can make bug reports for libc++ and MSVC's STL too. If this is a defect, what
would make std::any different from other containers like std::variant
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112591)? Also, what would be the
intended behavior be here if this is a defect and the current implementations
are correct? The standard goes out of its way to avoid allowing two objects of
the same type to have the same address, except when they're constant and
specifically marked non-unique which avoids issues such as destroying either
object and then using the other object.

Reply via email to