mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-09 23:34:23 +00:00
v0.7.1
This commit is contained in:
parent
e24befa5fd
commit
f4d98123d9
3 changed files with 5 additions and 5 deletions
|
|
@ -16,7 +16,7 @@
|
|||
[](https://travis-ci.org/Neargye/magic_enum)
|
||||
[](https://ci.appveyor.com/project/Neargye/magic-enum-hf8vk/branch/master)
|
||||
[](https://www.codacy.com/app/Neargye/magic_enum?utm_source=github.com&utm_medium=referral&utm_content=Neargye/magic_enum&utm_campaign=Badge_Grade)
|
||||
[](https://wandbox.org/permlink/wQyldHgJZfrnWx9x)
|
||||
[](https://wandbox.org/permlink/CmWdR9oPY4vhWYuH)
|
||||
[](https://godbolt.org/z/BxfmsH)
|
||||
|
||||
# Magic Enum C++
|
||||
|
|
@ -94,7 +94,7 @@ enum class Color { RED = 2, BLUE = 4, GREEN = 8 };
|
|||
* Indexed access to enum value
|
||||
|
||||
```cpp
|
||||
int i = 1;
|
||||
std::size_t i = 1;
|
||||
Color color = magic_enum::enum_value<Color>(i);
|
||||
// color -> Color::BLUE
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue