Open
Description
const std = @import("std");
const page_size = 4096;
test {
try std.testing.expect(@log2(page_size) == 12);
}
test.zig:6:34: error: expected vector of floats or float type, found 'comptime_int'
try std.testing.expect(@log2(page_size) == 12);
^~~~~~~~~
This code should work, in addition to runtime-known integers. It should return a value whose type has log2 number of bits.
Related: #3321