AA with complex keytype?

Lionello Lunesu lio at lunesu.remove.com
Fri Feb 9 03:50:11 PST 2007


Oskar Linde wrote:
> Andrei Alexandrescu (See Website For Email) wrote:
>> Manfred Nowak wrote:
>>> For complex numbers comparisons other than == and != are not defined.
>>>
>>> AA's require classes to have comparisons defined.
>>>
>>> Why are AA's of complex numbers allowed?
>>
>> Asociative arrays are unordered. All they need is a hash function, 
>> which can be defined over any data type.
> 
> Not the DMD associative arrays. They require full ordering.


Yes, ordering (opCmp) is used in case of hash collisions.

L.



More information about the Digitalmars-d mailing list