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



--- Comment #2 from Steven Schveighoffer <schvei...@yahoo.com> 2010-02-09 
14:37:33 PST ---
that is an unimportant technical difference.  The semantic meaning of the
feature is that if you have a type T, and a struct S fully defined as:

struct S
{
  T member;
}

Then this assert should always pass:

S s1, s2;
... // initialize s1 and s2 to whatever you want
assert((s1 == s2) is (s1.member == s2.member));

Bitwise compare happens to be the comparison operator for all builtins except
for floating point and arrays.  Although opEquals isn't defined, they certainly
have special comparison operators, and those should be invoked when comparing
containing structs.  This is the principle of least surprise, especially when
arrays back types like strings.

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

Reply via email to