template<typename T>
slang::bitmask class

A convenience wrapper around an enum that is intended to be used as a combination of bitwise-combined flags.

Built-in strongly-typed C++ enums are not otherwise combinable via operators like | and &.

Constructors, destructors, conversion operators

operator bool() const explicit constexpr noexcept

Public functions

auto has(const bitmask& r) const -> bool constexpr noexcept
Returns true iff (*this & r) != 0.
auto bits() const -> underlying_type constexpr noexcept

Function documentation

template<typename T>
slang::bitmask<T>::operator bool() const explicit constexpr noexcept

Returns true if any flags at all are set (non-zero), otherwise false.

template<typename T>
underlying_type slang::bitmask<T>::bits() const constexpr noexcept

Returns the underlying integer value containing the combined flags.