@shlWithOverflow
@shlWithOverflow
@shlWithOverflow(a: anytype, shift_amt: Log2T) struct { @TypeOf(a), u1 }
Performs a << b and returns a tuple with the result and a possible overflow bit.
The type of shift_amt is an unsigned integer with log2(@typeInfo(@TypeOf(a)).Int.bits) bits. This is because shift_amt >= @typeInfo(@TypeOf(a)).Int.bits is undefined behavior.
See also:
- @shlExact
- @shrExact
