
Helper traits for const generic bitwise bounds
```rust
![allow(incomplete_features)]
![feature(genericconstexprs)]
use bit_bounds::{IsPowerOf2, usize::*};
struct Buffer {
inner: [usize; N],
}
impl Buffer
where
Int: IsPowerOf2
{
pub const fn new() -> Self {
Buffer { inner: [0; N] }
}
}
fn extract_index(counter: usize) -> usize
where
Int: IsPowerOf2,
Int: BitsAllClear<{ (u32::MAX as usize) << 32 }>,
{
(counter >> 32) & (N - 1)
}
```