update readme

This commit is contained in:
terik23 2019-03-25 00:02:47 +05:00
parent f69edb9224
commit 7723ced483

View file

@ -22,7 +22,7 @@ Before, you had to use string literals to refer to definitions, which is brittle
## Features ## Features
* C++17 * C++17
* Simple syntax. * Simple syntax
* Header-only * Header-only
* Dependency-free * Dependency-free
* Compile-time * Compile-time
@ -61,12 +61,9 @@ NAMEOF_ENUM(c) -> "RED"
// Name of enum variable // Name of enum variable
nameof::nameof_enum(c) -> "RED" nameof::nameof_enum(c) -> "RED"
constexpr auto cx_name = NAMEOF_ENUM(c); constexpr auto cx_color = Color::BLUE;
static_assert("RED" == cx_name);
constexpr auto cx_color = Color::RED;
// Name of static storage enum variable // Name of static storage enum variable
nameof::nameof_enum<cx_color>() -> "RED" nameof::nameof_enum<cx_color>() -> "BLUE"
``` ```
* Name of type * Name of type