[Issue 14107] compiler shouldn't allow to compare unions without custom opEquals

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Feb 9 20:24:29 PST 2016


https://issues.dlang.org/show_bug.cgi?id=14107

--- Comment #2 from Marco Leise <Marco.Leise at gmx.de> ---
I think when I wrote the above I wasn't aware that unions can have toString().
Can they also offer a custom opEquals() ? That would be more convenient for
cases like the color example or float/int "reinterpret cast" named unions which
can perform the comparison themselves instead of the one in Higgs that is
anonymously embedded in a struct with a tag.

--


More information about the Digitalmars-d-bugs mailing list