I thought I could write code to determine these sizes, but the following does not work. The reported size is zero. Is there another way I can do this?
const std = @import("std");
const expectEqual = std.testing.expectEqual;
test "comptime sizes" {
const i = 7;
try expectEqual(comptime_int, @TypeOf(i));
// try expectEqual(8, @sizeOf(@TypeOf(i))); // fails
const f = 3.14;
try expectEqual(comptime_float, @TypeOf(f));
// try expectEqual(8, @sizeOf(@TypeOf(f))); // fails
}