Unexpected behaviour in associative array

Arredondo arm.plus at gmail.com
Fri Apr 19 11:10:16 UTC 2019


Hi all,

I'm using a custom Struct as the key type in an associative 
array. I have defined the toHash() and opEquals(...) functions, 
and the problem I'm having is that the test

mykey in aa

always fails (returns null) even though there are keys in the aa 
that return identical toHash() values than mykey and return true 
for opEquals. This is beyond frustrating, because at this point 
I'm pretty much out of ideas.

Have you had this problem before? Any tips or suggestions would 
be much appreciated.
Arredondo.


More information about the Digitalmars-d-learn mailing list