mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-09 23:34:23 +00:00
add bitwise_operators
This commit is contained in:
parent
cd01fa1ba4
commit
9a700b545d
4 changed files with 71 additions and 8 deletions
|
|
@ -118,7 +118,7 @@ enum Color { RED = 2, BLUE = 4, GREEN = 8 };
|
|||
|
||||
* Stream operator for enum
|
||||
```cpp
|
||||
using namespace magic_enum::ops; // out-of-the-box stream operator for enums.
|
||||
using namespace magic_enum::ostream_operators; // out-of-the-box ostream operators for enums.
|
||||
Color color = Color::BLUE;
|
||||
std::cout << color << std::endl; // "BLUE"
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue