|
NUMA++ 0.11.0
|
Contains definitions for bitwise operators for enums. More...
#include <type_traits>Go to the source code of this file.
Namespaces | |
| namespace | numapp |
Macros | |
| #define | NUMAPP_ENABLE_BITFLAG(enum) |
| Enables numapp bitwise operators in overload set for the specified enumeration enum. | |
Functions | |
Bitwise operators for enabled enums | |
Convenience function to compose bit flags using bitwise OR and AND operators. Example: using numapp::operator|; // Bring in numapp::operator| in this scope
MyEnum f = MyEnum::A | MyEnum::B;
f &= MyEnum::A;
MyFunc(f);
MyFunc(MyEnum::A | MyEnum::B);
| |
| template<class Enum, typename = typename std::enable_if<IsFlagEnum<Enum>::value>::type> | |
| constexpr Enum | numapp::operator| (Enum lhs, Enum rhs) noexcept |
| template<class Enum, typename = typename std::enable_if<IsFlagEnum<Enum>::value>::type> | |
| constexpr Enum & | numapp::operator|= (Enum &lhs, Enum rhs) noexcept |
| Sets lhs with logical OR between lhs and rhs. | |
| template<class Enum, typename = typename std::enable_if<IsFlagEnum<Enum>::value>::type> | |
| constexpr Enum | numapp::operator& (Enum lhs, Enum rhs) noexcept |
| template<class Enum, typename = typename std::enable_if<IsFlagEnum<Enum>::value>::type> | |
| constexpr Enum & | numapp::operator&= (Enum &lhs, Enum rhs) noexcept |
| Sets lhs with logical AND between lhs and rhs. | |
Contains definitions for bitwise operators for enums.
Definition in file flags.hpp.
| #define NUMAPP_ENABLE_BITFLAG | ( | enum | ) |