header_utils
|
Functions | |
template<typename RESULT_TYPE = unsigned long long, typename... ARGS> requires detail::valid_flag_bits_arguments<RESULT_TYPE, ARGS...> | |
constexpr RESULT_TYPE | ghassanpl::flag_bits (ARGS... args) noexcept |
Takes a list of enum values that represent bit numbers (not actual bit values) and returns a value with all the chosen bits set. | |
template<typename INTEGRAL , typename ENUM_TYPE > requires detail::valid_flag_bits_arguments<INTEGRAL, ENUM_TYPE> | |
constexpr bool | ghassanpl::is_flag_set (INTEGRAL const &bits, ENUM_TYPE flag) noexcept |
Checks if an integral value has the bit at number represented by flag set. | |
template<typename INTEGRAL , typename... ARGS> requires detail::valid_flag_bits_arguments<INTEGRAL, ARGS...> | |
constexpr bool | ghassanpl::are_any_flags_set (INTEGRAL const &bits, ARGS... args) noexcept |
Checks if an integral value has any of the bits at numbers represented by args set. | |
template<typename INTEGRAL , typename... ARGS> requires detail::valid_flag_bits_arguments<INTEGRAL, ARGS...> | |
constexpr bool | ghassanpl::are_all_flags_set (INTEGRAL const &bits, ARGS... args) noexcept |
Checks if an integral value has all of the bits at numbers represented by args set. | |
template<typename INTEGRAL , typename... ARGS> requires detail::valid_flag_bits_arguments<INTEGRAL, ARGS...> | |
constexpr void | ghassanpl::set_flags (INTEGRAL &bits, ARGS... args) noexcept |
Sets the bits at numbers represented by args in bits | |
template<typename INTEGRAL , typename... ARGS> requires detail::valid_flag_bits_arguments<INTEGRAL, ARGS...> | |
constexpr void | ghassanpl::unset_flags (INTEGRAL &bits, ARGS... args) noexcept |
Unsets the bits at numbers represented by args in bits | |
template<typename INTEGRAL , typename... ARGS> requires detail::valid_flag_bits_arguments<INTEGRAL, ARGS...> | |
constexpr void | ghassanpl::toggle_flags (INTEGRAL &bits, ARGS... args) noexcept |
Toggles the bits at numbers represented by args in bits | |
template<typename INTEGRAL , typename... ARGS> requires detail::valid_flag_bits_arguments<INTEGRAL, ARGS...> | |
constexpr void | ghassanpl::set_flags_to (INTEGRAL &bits, bool val, ARGS... args) noexcept |
Sets the bits at numbers represented by args in bits to either 0 or 1, depending on val | |
|
constexprnoexcept |
Checks if an integral value has all of the bits at numbers represented by args
set.
Definition at line 77 of file flag_bits.h.
|
constexprnoexcept |
Checks if an integral value has any of the bits at numbers represented by args
set.
Definition at line 69 of file flag_bits.h.
|
constexprnoexcept |
Takes a list of enum values that represent bit numbers (not actual bit values) and returns a value with all the chosen bits set.
RESULT_TYPE | the type of the result value, unsigned long long by default |
Definition at line 55 of file flag_bits.h.
|
constexprnoexcept |
Checks if an integral value has the bit at number represented by flag
set.
Definition at line 64 of file flag_bits.h.
|
constexprnoexcept |
Sets the bits at numbers represented by args
in bits
Definition at line 85 of file flag_bits.h.
|
constexprnoexcept |
Sets the bits at numbers represented by args
in bits
to either 0 or 1, depending on val
Definition at line 100 of file flag_bits.h.
|
constexprnoexcept |
Toggles the bits at numbers represented by args
in bits
Definition at line 95 of file flag_bits.h.