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:
parent
172c685547
commit
34c86eaf11
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue