diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-11-22 15:10:34 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-11-22 15:10:51 -0800 |
| commit | a3342cea188e1c006b20dd2e4712398f9e8c7fdd (patch) | |
| tree | 49450a37ecbe9df4bbe0da4ba471425358e31dc2 /src/codegen | |
| parent | 73dcd1914071984c5a2e7c195212404824dbfb9e (diff) | |
| download | zig-a3342cea188e1c006b20dd2e4712398f9e8c7fdd.tar.gz zig-a3342cea188e1c006b20dd2e4712398f9e8c7fdd.zip | |
std.mem.eql: make comparisons for zero-sized and non-sized types work
The `if (@sizeOf(T) == 0) return true;` check simply doesn't work for a number
of cases so that is removed and changed into `@sizeOf(T) != 0` and then
used in the `eqlBytes` check chain to make comparing `enum{}`s possible.
The rest special-cases for comptime-only types and undefined to make
those comparisons possible as well.
Fixes #19929
Diffstat (limited to 'src/codegen')
0 files changed, 0 insertions, 0 deletions
