mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-09 23:34:23 +00:00
Introduce contains_value()
* split enum_traits index * add more proper way to check if enum contains certain value * change description of contains_value() and add it in readme
This commit is contained in:
parent
1e6c9a5a5a
commit
aa24461613
3 changed files with 47 additions and 4 deletions
|
|
@ -32,6 +32,7 @@ Header-only C++17 library provides static reflection for enums, work with any en
|
|||
* `enum_names` obtains string enum name sequence.
|
||||
* `enum_entries` obtains pair (value enum, string enum name) sequence.
|
||||
* `enum_index` obtains index in enum value sequence from enum value.
|
||||
* `contains_value` checks whether enum contains such value
|
||||
* `is_unscoped_enum` checks whether type is an [Unscoped enumeration](https://en.cppreference.com/w/cpp/language/enum#Unscoped_enumeration).
|
||||
* `is_scoped_enum` checks whether type is an [Scoped enumeration](https://en.cppreference.com/w/cpp/language/enum#Scoped_enumerations).
|
||||
* `underlying_type` improved UB-free "SFINAE-friendly" [std::underlying_type](https://en.cppreference.com/w/cpp/types/underlying_type).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue