[Issue 3789] Structs members that require non-bitwise comparison not correctly compared

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 24 14:18:36 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=3789


jens.k.mueller at gmx.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jens.k.mueller at gmx.de


--- Comment #20 from jens.k.mueller at gmx.de 2012-10-24 14:18:31 PDT ---
(In reply to comment #1)
> Arrays don't have a an opEquals overloaded operator. What's the bug?

I don't understand.
How can arrays have no opEquals yet this

assert(bar.data == foo.data);

compiles?
Syntactically there is opEquals and it checks whether each element is equal to
the corresponding other element.

And the opEquals generated by default should for each member call opEquals if
it exists. Otherwise it falls back to bit-wise equality.
Why should it be different from this?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list