update readme
This commit is contained in:
parent
223b9e606c
commit
822abbf169
1 changed files with 2 additions and 9 deletions
11
README.md
11
README.md
|
@ -96,6 +96,8 @@ static_assert("__LINE__" == cx_name);
|
||||||
|
|
||||||
* The argument expression identifies code definition, but it is never evaluated.
|
* The argument expression identifies code definition, but it is never evaluated.
|
||||||
|
|
||||||
|
* NAMEOF_ENUM supported on the GCC >= 9.
|
||||||
|
|
||||||
* If you need raw fully-qualified name, use NAMEOF_RAW.
|
* If you need raw fully-qualified name, use NAMEOF_RAW.
|
||||||
```cpp
|
```cpp
|
||||||
NAMEOF_RAW(somevar.somefield) -> "somevar.somefield"
|
NAMEOF_RAW(somevar.somefield) -> "somevar.somefield"
|
||||||
|
@ -103,15 +105,6 @@ NAMEOF_RAW(&SomeStruct::SomeMethod) -> "&SomeStruct::SomeMethod"
|
||||||
NAMEOF_RAW(std::string) -> "std::string"
|
NAMEOF_RAW(std::string) -> "std::string"
|
||||||
```
|
```
|
||||||
|
|
||||||
* NAMEOF_ENUM does not work on the GCC.
|
|
||||||
```cpp
|
|
||||||
auto c = Color::RED;
|
|
||||||
NAMEOF_ENUM(c) -> "(Color)0"
|
|
||||||
nameof::nameof_enum(c) -> "(Color)0"
|
|
||||||
|
|
||||||
NAMEOF(Color::RED) -> "RED"
|
|
||||||
```
|
|
||||||
|
|
||||||
* Spaces and Tabs ignored
|
* Spaces and Tabs ignored
|
||||||
```cpp
|
```cpp
|
||||||
NAMEOF( somevar ) -> "somevar"
|
NAMEOF( somevar ) -> "somevar"
|
||||||
|
|
Loading…
Reference in a new issue