Struct Comparison

Walter Bright newshound1 at digitalmars.com
Thu Oct 22 16:57:14 PDT 2009


Don wrote:
> Yes. This is something the compiler can't (or shouldn't) do.

It shouldn't do it. If a memberwise compare is done, it should do them 
in order. This allows the struct designer to lay out the fields 
optimally (similarly to how case statement order affects efficiency in 
switch statements).



More information about the Digitalmars-d mailing list