zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 6c0719fd5f29f524b789d5038fdc9fc0878f2e6a (tree)
parent cea310c9082a985b103953dd84579aa1a6dce6ea
Author: Isaac Freund <mail@isaacfreund.com>
Date:   Tue, 26 Apr 2022 17:00:52 +0200

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

Diffstat:
Mlib/std/meta.zig | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/std/meta.zig b/lib/std/meta.zig @@ -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,