[Bug libstdc++/93147] std::tuple of empty structs with member equality operators has ambiguous equality operator

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 3 21:41:00 GMT 2020


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

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Alexander Kondratskiy from comment #6)
> What's strange here is that if one
> of the structs isn't empty, the problem goes away - it's more subtle than
> "the compiler sees the equality operators". Could the empty-base
> optimization play a role? Common initial sequence?

That's not surprising at all. We only use derivation for tuple elements that
are empty types, otherwise they're just data members.


More information about the Gcc-bugs mailing list