Use classes as keys in associative array

ikod geller.garry at gmail.com
Sat Jun 6 20:32:34 UTC 2020


On Saturday, 6 June 2020 at 20:31:36 UTC, ikod wrote:
> On Saturday, 6 June 2020 at 16:49:29 UTC, JN wrote:
>> Is it possible to use different class instances as keys for 
>> associative array, but compare them by the contents? I tried 
>> to override opEquals but it doesn't seem to work. Basically I'd
>
> May be wrong, but probably you have to override opEquals to 
> Object, not to another class instance.

Oops, sorry, it was answered already


More information about the Digitalmars-d-learn mailing list