Unexpected behaviour in associative array
Andre Pany
andre at s-e-a-p.de
Fri Apr 19 11:32:17 UTC 2019
On Friday, 19 April 2019 at 11:10:16 UTC, Arredondo wrote:
> 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.
Could you please post the coding, otherwise it is quite hard to
help you.
Kind regards
Andre
More information about the Digitalmars-d-learn
mailing list