OmniSciDB
a5dc49c757
|
#include <EnumBitmaskOps.h>
Static Public Attributes | |
static constexpr bool | enable = false |
Template operators to add typesafe bitwise operators to enum classes. These are intended for use with mask types, so shift operators are not provided as they can lead to invalid bits being set.
To avoid nest namespace issues, ENABLE_BITMASK_OPS must be used outside any namespaces
Example Usage: namespace my_namespace { enum class MyEnum : uint8_t { kEmpty = 0x00, kSomething = 0x01, kAnother = 0x02 }; } // namespace my_namespace
ENABLE_BITMASK_OPS(::my_namespace::MyEnum) MyEnum e = MyEnum::kSomething & MyEnum::kAnother;
Definition at line 42 of file EnumBitmaskOps.h.
|
static |
Definition at line 43 of file EnumBitmaskOps.h.