4.6.0
Freundlich's C++ toolkit
|
Bit operations.
This module provides safer bit operations, namely generating a shifted bit mask and testing a bit mask against a value.
Classes | |
class | fcppt::bit::mask< Type > |
A bit mask. More... | |
Typedefs | |
using | fcppt::bit::shift_count = unsigned |
The unsigned type representing a shift count. | |
Functions | |
template<typename Type , Type Mask> | |
constexpr fcppt::bit::mask< Type > | fcppt::bit::mask_c () noexcept |
A bit mask from an integral constant. | |
template<typename Type > | |
constexpr fcppt::bit::mask< Type > | fcppt::bit::shifted_mask (fcppt::bit::shift_count const _bits) noexcept |
A shifted mask. | |
template<typename Type , fcppt::bit::shift_count Bits> requires (Bits < std::numeric_limits<Type>::digits) | |
constexpr fcppt::bit::mask< Type > | fcppt::bit::shifted_mask_c () noexcept |
A constant shifted mask. | |
template<typename Type > | |
bool | fcppt::bit::test (Type const _value, fcppt::bit::mask< Type > const _mask) noexcept |
Tests a value against a bit mask. | |
using fcppt::bit::shift_count = unsigned |
The unsigned type representing a shift count.
|
constexprnoexcept |
A bit mask from an integral constant.
|
constexprnoexcept |
A shifted mask.
|
constexprnoexcept |
A constant shifted mask.
|
inlinenoexcept |
Tests a value against a bit mask.