Skip to content

Commit 60924b6

Browse files
committed
Disabled toHash in -betterC for now
TypeInfo is part of DRuntime. See: #5952 Replaced `toHash` with a parameter-less template for codegen on demand.
1 parent 552d139 commit 60924b6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

std/typecons.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,12 +1169,12 @@ if (distinctFieldNames!(Specs))
11691169
Returns:
11701170
A `size_t` representing the hash of this `Tuple`.
11711171
*/
1172-
size_t toHash() const nothrow @safe
1172+
size_t toHash() const nothrow @trusted
11731173
{
11741174
size_t h = 0;
11751175
static foreach (i, T; Types)
11761176
{{
1177-
const k = typeid(T).getHash((() @trusted => cast(const void*) &field[i])());
1177+
const k = hashOf(field[i]);
11781178
static if (i == 0)
11791179
h = k;
11801180
else

0 commit comments

Comments
 (0)