update readme

This commit is contained in:
terik23 2019-03-24 21:18:15 +05:00
parent d3529f8cd0
commit 64651133ea

View file

@ -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"
``` ```