[Issue 19009] New: core.internal.hash.hashOf default hash (absent `toHash`) should be `@nogc`

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 20 16:21:29 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=19009

          Issue ID: 19009
           Summary: core.internal.hash.hashOf default hash (absent
                    `toHash`) should be `@nogc`
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: n8sh.secondary at hotmail.com

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.

--


More information about the Digitalmars-d-bugs mailing list