We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aaea1e7 commit afe5406Copy full SHA for afe5406
1 file changed
std/typecons.d
@@ -1116,12 +1116,20 @@ if (distinctFieldNames!(Specs))
1116
Returns:
1117
A `size_t` representing the hash of this `Tuple`.
1118
*/
1119
- size_t toHash() const nothrow @trusted
+ size_t toHash()() const nothrow @trusted
1120
{
1121
- size_t h = 0;
1122
- foreach (i, T; Types)
1123
- h += typeid(T).getHash(cast(const void*)&field[i]);
1124
- return h;
+ version(D_BetterC)
+ {
+ // Disabled in -betterC for now as TypeInfo isn't present
+ static assert(0, "Not implemented");
1125
+ }
1126
+ else
1127
1128
+ size_t h = 0;
1129
+ foreach (i, T; Types)
1130
+ h += typeid(T).getHash(cast(const void*)&field[i]);
1131
+ return h;
1132
1133
}
1134
1135
///
0 commit comments