For classes (and structs with toHash method) we use v.toHash() to compute hash.
toHash method MUST BE @safe or @trusted, as all HashMap code alredy safe.
See also: https://dlang.org/spec/hash-map.html#using_classes_as_key and https://dlang.org/spec/hash-map.html#using_struct_as_key
See Implementation
For classes (and structs with toHash method) we use v.toHash() to compute hash.
toHash method MUST BE @safe or @trusted, as all HashMap code alredy safe.
See also: https://dlang.org/spec/hash-map.html#using_classes_as_key and https://dlang.org/spec/hash-map.html#using_struct_as_key