<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 26 July 2014 06:38, Walter Bright via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 7/25/2014 4:10 AM, Regan Heath wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sure, Andrei makes a valid point .. for a minority of cases.  The majority case<br>
will be that opEquals and opCmp==0 will agree.  In those minority cases where<br>
they are intended to disagree the user will have intentionally defined both, to<br>
be different.  I cannot think of any case where a user will intend for these to<br>
be different, then not define both to ensure it.<br>
</blockquote>
<br></div>
You've agreed with my point, then, that autogenerating opEquals as memberwise equality (not opCmp==0) if one is not supplied will be correct unless the user code is already broken.<br>
</blockquote></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">No, because there's no obvious reason to define opEquals if you do define opCmp, and the opEq</div></div>