mirror of
https://github.com/ziglang/zig.git
synced 2026-02-15 22:09:49 +00:00
std.meta: deprecate bitCount() for @bitSizeOf()
This commit is contained in:
parent
cea310c908
commit
6c0719fd5f
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user