chrono::Ch_enable_bitmask_operators< E > Struct Template Reference
Description
template<typename E>
struct chrono::Ch_enable_bitmask_operators< E >
Helper for adding bitmask operators | ^ & etc.
to strongly typed enum classes. Use it as in this example:
enum class Permissions { Readable = 0x4, Writeable = 0x2 }; template<> struct Ch_enable_bitmask_operators<Permissions>{ static constexpr bool enable=true; }; Permissions p = Permissions::Readable | Permissions::Writable;
Alternative: better use CH_ENABLE_BITMASK_OPERATORS macro, it is less typing.
#include <ChBitmaskEnums.h>
Static Public Attributes | |
static const bool | enable =false |
The documentation for this struct was generated from the following file:
- /builds/uwsbel/chrono/src/chrono/core/ChBitmaskEnums.h