| ... | @@ -97,6 +97,8 @@ test "std.meta.stringToEnum" { | ... | @@ -97,6 +97,8 @@ test "std.meta.stringToEnum" { |
| 97 | try testing.expect(null == stringToEnum(E1, "C")); | 97 | try testing.expect(null == stringToEnum(E1, "C")); |
| 98 | } | 98 | } |
| 99 | | 99 | |
| | 100 | /// Deprecated, use `@bitSizeOf()`. |
| | 101 | /// TODO Remove this after zig 0.10.0 is released. |
| 100 | pub fn bitCount(comptime T: type) comptime_int { | 102 | pub fn bitCount(comptime T: type) comptime_int { |
| 101 | return switch (@typeInfo(T)) { | 103 | return switch (@typeInfo(T)) { |
| 102 | .Bool => 1, | 104 | .Bool => 1, |