1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-09 23:34:23 +00:00
This commit is contained in:
Pavel I. Kryukov 2022-02-19 14:09:33 +03:00 committed by GitHub
parent ec87fc976c
commit c9388f1c99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View file

@ -141,9 +141,9 @@ enum class Color { RED = 2, BLUE = 4, GREEN = 8 };
* Enum fusion for multi-level switch/case statements
```cpp
switch (magic_enum::enum_fuse(color, direction)) {
case magic_enum::enum_fuse(Color::RED, Directions::Up): // ...
case magic_enum::enum_fuse(Color::BLUE, Directions::Down): // ...
switch (magic_enum::enum_fuse(color, direction).value()) {
case magic_enum::enum_fuse(Color::RED, Directions::Up).value(): // ...
case magic_enum::enum_fuse(Color::BLUE, Directions::Down).value(): // ...
// ...
}
```