On Tuesday, March 19, 2013 18:20:35 H. S. Teoh wrote: > I like this idea. By default, provide something that recursively > compares struct/class members, array elements, etc.. But if at any level > an opEquals is defined, then that is used instead. This maximizes > convenience for those cases where you *do* just want a literal equality > of all sub-structures, but also allows you to override that behaviour if > your class/struct needs some other special processing.
We already get this. That's what == does by default. It's just that it uses == on each member, so if == doesn't work for a particular member variable and the semantics you want for == on the type it's in, you need to override opEquals. - Jonathan M Davis
