Re: opEquals default behaviour - poorly documented or am I missing something?

2015-11-18 Thread MichaelZ via Digitalmars-d-learn
On Tuesday, 17 November 2015 at 19:44:36 UTC, Ali Çehreli wrote: On 11/17/2015 12:40 AM, MichaelZ wrote: > In http://dlang.org/operatoroverloading.html#eqcmp it is stated that > > "If opEquals is not specified, the compiler provides a default version > that does member-wise comparison." > >

opEquals default behaviour - poorly documented or am I missing something?

2015-11-17 Thread MichaelZ via Digitalmars-d-learn
In http://dlang.org/operatoroverloading.html#eqcmp it is stated that "If opEquals is not specified, the compiler provides a default version that does member-wise comparison." However, doesn't this only apply to structs, and not objects? The default behaviour of opEquals for objects seems