Defining a class toHash() that include the typeinfo

Per Nordlöw per.nordlow at gmail.com
Fri Dec 21 15:05:12 UTC 2018


What's the preferred way of defining a `toHash()` for a concrete 
class that includes the TypeInfo [1] in the hash? Is it ok to 
hash only the address of the typeinfo pointer, assuming it's 
statically allocated?

[1] https://dlang.org/library/object/type_info.html


More information about the Digitalmars-d-learn mailing list