Bug 19009 – core.internal.hash.hashOf default hash (absent `toHash`) should be `@nogc`
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-06-20T16:21:29Z
Last change time
2018-07-02T18:44:55Z
Assigned to
No Owner
Creator
Nathan S.
Comments
Comment #0 by n8sh.secondary — 2018-06-20T16:21:29Z
The default `hashOf` implementation used for types that do not have `toHash` uses `toUbyte` to get the byte representation which during CTFE requires allocation but during execution does not. The compiler currently takes CTFE-only code into account when inferring attributes but we can give it some help.
Comment #1 by n8sh.secondary — 2018-06-20T16:34:27Z