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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to frankhb1989 from comment #8)
> bool operator==(const Y& a1, const Y& a2) noexcept
> {
>       return &a1 == &a2;

No, this is not allowed.

A copy of an allocator must compare equal to the original, so for "X u(a);" it
holds that "u == a". And a rebound copy of an allocator must also compare
equal, so for "X u(b);" it holds that "Y(u) == b && u == X(b)".

You're trying harder and harder to show a problem, and I simply don't believe
this can ever be a problem in real code. Any valid example you can construct
will be something completely stupid that I don't care about supporting because
we have far more important things to worry about.

Reply via email to