update readme
This commit is contained in:
parent
d3529f8cd0
commit
64651133ea
1 changed files with 3 additions and 2 deletions
|
@ -55,16 +55,17 @@ static_assert("foo" == cx_name);
|
||||||
|
|
||||||
* Name of enum
|
* Name of enum
|
||||||
```cpp
|
```cpp
|
||||||
// Name of enum
|
|
||||||
auto c = Color::RED;
|
auto c = Color::RED;
|
||||||
|
// Name of enum variable
|
||||||
NAMEOF_ENUM(c) -> "RED"
|
NAMEOF_ENUM(c) -> "RED"
|
||||||
// Name of enum
|
// Name of enum variable
|
||||||
nameof::nameof_enum(c) -> "RED"
|
nameof::nameof_enum(c) -> "RED"
|
||||||
|
|
||||||
constexpr auto cx_name = NAMEOF_ENUM(c);
|
constexpr auto cx_name = NAMEOF_ENUM(c);
|
||||||
static_assert("RED" == cx_name);
|
static_assert("RED" == cx_name);
|
||||||
|
|
||||||
constexpr auto cx_color = Color::RED;
|
constexpr auto cx_color = Color::RED;
|
||||||
|
// Name of static storage enum variable
|
||||||
nameof::nameof_enum<cx_color>() -> "RED"
|
nameof::nameof_enum<cx_color>() -> "RED"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue