pub fn has_flag<T>(bitset: T, flag: T) -> boolwhere
    T: Copy + PartialEq + BitAnd<T, Output = T>,