https://issues.dlang.org/show_bug.cgi?id=18918
Issue ID: 18918 Summary: core.internal.hash should perform memberwise hashing of structs with references Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: druntime Assignee: nob...@puremagic.com Reporter: n8sh.second...@hotmail.com So the following passes: ```d unittest { static struct S { char[] array; } auto s1 = S("abc".dup); auto s2 = S(s1.array.dup); import core.internal.hash : hashOf; assert(hashOf(s1) == hashOf(s2)); ``` The eventual goal is to make core.internal.hash usable as a replacement for `typeid(x).getHash(&x)` that doesn't require runtime type info (useful for `betterC`) and doesn't ignore `const`-correctness. --