AA with class keys compared with identity instead of opEquals

Per Nordlöw per.nordlow at gmail.com
Mon Sep 28 08:26:15 UTC 2020

On Sunday, 27 September 2020 at 19:45:07 UTC, Ferhat Kurtulmuş 
> Sorry I did not understand what you meant. It would be better 
> if you share the answer here. I found this also 
> https://dlang.org/library/std/traits/key_type.html, but I dont 
> know if it is related.

In the case where the AA-KeyType is a class (which is represented 
as a pointer in D) I want the equality (opEquals) and the hashing 
(toHash) of the AA to compare and hash the pointers themselves, 
not the fields the classes points to.

More information about the Digitalmars-d-learn mailing list