enum_traits< T > Struct Template Reference

#include <Bitmask.h>

Detailed Description

template<class T = void>
struct enum_traits< T >

Using enum classes as type-safe bitmasks.

enum class Color {
Red = 1 << 0,
Green = 1 << 1,
Blue = 1 << 2
};
ENABLE_BITMASK_OPERATORS(Color)
Color yellow = Color::Red | Color::Green;
Flags<Color> flags(yellow);
flags.testFlag(Color::Red);
flags.testFlag(Color::Green);

The documentation for this struct was generated from the following file: