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
a3342cea18Andrew Kelley committed on 11/22/2024, 11:10:51 PMparent73dcd19
1 file changedLine totals unavailable