Mir
|
#include <flags.h>
Public Types | |
using | value_type = typename std::underlying_type< Enum >::type |
Public Member Functions | |
constexpr | Flags (value_type flag_value=0) noexcept |
constexpr | Flags (Enum flag_value) noexcept |
constexpr Flags< Enum > | operator| (Flags< Enum > other) const noexcept |
constexpr Flags< Enum > | operator& (Flags< Enum > other) const noexcept |
constexpr Flags< Enum > | operator^ (Flags< Enum > other) const noexcept |
Flags< Enum > & | operator|= (Flags< Enum > other) noexcept |
Flags< Enum > | operator&= (Flags< Enum > other) noexcept |
Flags< Enum > | operator^= (Flags< Enum > other) noexcept |
constexpr bool | operator== (Flags< Enum > other) const noexcept |
constexpr bool | operator!= (Flags< Enum > other) const noexcept |
constexpr value_type | value () const noexcept |
Treat an enumeration, scoped and unscoped, like a set of flags.
For scoped enumerations, there are optional bitwise operators available that can be enabled by declaring a function within the namespace of the enumeration (here Enum):
using mir::Flags< Enum >::value_type = typename std::underlying_type<Enum>::type |
|
inlineexplicitnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Copyright © 2012-2016 Canonical Ltd.
Generated on Mon Jun 5 13:49:26 UTC 2017