@boolToInt

@boolToInt

@boolToInt(value: bool) u1

Converts true to u1(1) and false to u1(0).

If the value is known at compile-time, the return type is comptime_int instead of u1.