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
73c1d83646
commit
6992f41db7
1 changed files with 10 additions and 15 deletions
25
README.md
25
README.md
|
|
@ -1,16 +1,3 @@
|
|||
[](https://bit.ly/3OMysM8)
|
||||
|
||||
```text
|
||||
__ __ _ ______ _____
|
||||
| \/ | (_) | ____| / ____|_ _
|
||||
| \ / | __ _ __ _ _ ___ | |__ _ __ _ _ _ __ ___ | | _| |_ _| |_
|
||||
| |\/| |/ _` |/ _` | |/ __| | __| | '_ \| | | | '_ ` _ \ | | |_ _|_ _|
|
||||
| | | | (_| | (_| | | (__ | |____| | | | |_| | | | | | | | |____|_| |_|
|
||||
|_| |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_| \_____|
|
||||
__/ |
|
||||
|___/
|
||||
```
|
||||
|
||||
[](https://github.com/Neargye/magic_enum/releases)
|
||||
[](https://conan.io/center/recipes/magic_enum)
|
||||
[](https://github.com/microsoft/vcpkg/tree/master/ports/magic-enum)
|
||||
|
|
@ -24,13 +11,15 @@
|
|||
|
||||
Header-only C++17 library provides static reflection for enums, work with any enum type without any macro or boilerplate code.
|
||||
|
||||
If you like this project, please consider donating to one of the funds that help victims of the war in Ukraine: https://u24.gov.ua.
|
||||
|
||||
## Documentation
|
||||
|
||||
* [Reference](doc/reference.md)
|
||||
* [Limitations](doc/limitations.md)
|
||||
* [Integration](#Integration)
|
||||
|
||||
## [Examples](example/)
|
||||
## [Features & Examples](example/)
|
||||
|
||||
* Enum value to string
|
||||
|
||||
|
|
@ -194,11 +183,17 @@ Header-only C++17 library provides static reflection for enums, work with any en
|
|||
* IOstream operator for enum
|
||||
|
||||
```cpp
|
||||
using namespace magic_enum::ostream_operators; // out-of-the-box ostream operators for enums.
|
||||
using magic_enum::iostream_operators::operator<<; // out-of-the-box ostream operators for enums.
|
||||
Color color = Color::BLUE;
|
||||
std::cout << color << std::endl; // "BLUE"
|
||||
```
|
||||
|
||||
```cpp
|
||||
using magic_enum::iostream_operators::operator>>; // out-of-the-box istream operators for enums.
|
||||
Color color;
|
||||
std::cin >> color;
|
||||
```
|
||||
|
||||
* Bitwise operator for enum
|
||||
|
||||
```cpp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue