Matthias Walter xammy at
Sun Nov 28 08:34:56 PST 2010

On 11/27/2010 02:05 PM, bearophile wrote:
>> Reduced case for bugzilla:
I investigated into the bug and the reason is the signature of opEquals,
which currently is

bool opEquals(Tdummy=void)(ref const BigInt y) const
bool opEquals(T: int)(T y) const

The only working sigature for array-of-structs-comparison to work is

bool opEquals(ref const BigInt y) const

But this removes the ability to compare against ints.
(btw, it should probably be long in the 2nd signature?!)

array-comparison should definitely take templated opEquals functions
into account, or is there something mentioned in the spec?


More information about the Digitalmars-d-learn mailing list