Function isValidAlignGeneric [src]
Returns whether alignment is a valid alignment, meaning it is
a positive power of 2.
Prototype
pub fn isValidAlignGeneric(comptime T: type, alignment: T) bool
Parameters
T: type
alignment: T
Source
pub fn isValidAlignGeneric(comptime T: type, alignment: T) bool {
return alignment > 0 and std.math.isPowerOfTwo(alignment);
}