Closed nvzqz closed 4 years ago
We should be able to create a ByteSet from a..b or a..=b where a and b are u8, and have it be usable in const.
ByteSet
a..b
a..=b
a
b
u8
const
The API should look like:
const fn from_range(range: std::ops::Range<u8>) -> ByteSet
const fn from_range_inclusive(range: std::ops::RangeInclusive<u8>) -> ByteSet
I expect this would be implemented via bit tricks over the integer chunk representation.
We should be able to create a
ByteSet
froma..b
ora..=b
wherea
andb
areu8
, and have it be usable inconst
.The API should look like:
const fn from_range(range: std::ops::Range<u8>) -> ByteSet
const fn from_range_inclusive(range: std::ops::RangeInclusive<u8>) -> ByteSet
I expect this would be implemented via bit tricks over the integer chunk representation.