How do I obtain the default hash of a user-defined struct
FreeSlave
freeslave93 at gmail.com
Wed Apr 2 13:39:46 PDT 2014
On Wednesday, 2 April 2014 at 20:14:31 UTC, dnspies wrote:
> How can I get the default-hash of a struct I've defined (to be
> used as part of the hash for some containing type)?
UserDefined userDefined;
writeln(typeid(UserDefined).getHash(&userDefined));
Probably there is a better way. I don't like to call typeid for
this purpose.
More information about the Digitalmars-d-learn
mailing list