1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-09 23:34:23 +00:00

update readme

This commit is contained in:
terik23 2019-07-25 00:38:11 +05:00
parent 172c685547
commit 34c86eaf11

View file

@ -129,6 +129,7 @@ enum Color { RED = 2, BLUE = 4, GREEN = 8 };
```cpp
enum class Flags { A = 1 << 0, B = 1 << 1, C = 1 << 2, D = 1 << 3 };
using namespace magic_enum::bitwise_operators; // out-of-the-box bitwise operators for enums.
// Support operators: ~, |, &, ^, |=, &=, ^=.
Flags flags = Flags::A | Flags::B & ~Flags::C;
```