std.meta: deprecate bitCount() for @bitSizeOf()

This commit is contained in:
Isaac Freund 2022-04-26 17:00:52 +02:00
parent cea310c908
commit 6c0719fd5f

View File

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