update doc

This commit is contained in:
neargye 2019-10-03 18:30:48 +05:00
parent 4319be3c2e
commit 4b3536d211
2 changed files with 15 additions and 3 deletions

View file

@ -4,16 +4,18 @@
# Nameof Type # Nameof Type
* To check is nameof_type supported compiler use macro `NAMEOF_TYPE_SUPPORTED` or constexpr constant `nameof::is_nameof_type_supported`.
* This library uses a compiler-specific hack (based on `__PRETTY_FUNCTION__` / `__FUNCSIG__`), which works on Clang >= 5, MSVC >= 15.3 and GCC >= 7. * This library uses a compiler-specific hack (based on `__PRETTY_FUNCTION__` / `__FUNCSIG__`), which works on Clang >= 5, MSVC >= 15.3 and GCC >= 7.
* Nameof type returns compiler-specific type name. * Nameof type returns compiler-specific type name.
* In all cases, reference and cv-qualifiers are ignored by `nameof_type` (that is, `nameof_type<const T&>() == nameof_type<T>()`). * If argument does not have name, occurs the compilation error `"Expression does not have a name."`.
* If you need detailed name of full type, use `nameof_full_type`.
# Nameof Enum # Nameof Enum
* To check is nameof_enum supported compiler use macro `NAMEOF_ENUM_SUPPORTED` or constexpr constant `nameof::is_nameof_enum_supported`.
* This library uses a compiler-specific hack (based on `__PRETTY_FUNCTION__` / `__FUNCSIG__`), which works on Clang >= 5, MSVC >= 15.3 and GCC >= 9. * This library uses a compiler-specific hack (based on `__PRETTY_FUNCTION__` / `__FUNCSIG__`), which works on Clang >= 5, MSVC >= 15.3 and GCC >= 9.
* Enum can't reflect if the enum is a forward declaration. * Enum can't reflect if the enum is a forward declaration.

View file

@ -14,6 +14,16 @@
* [`NAMEOF_TYPE_EXPR` macro that obtains string name type of expression, reference and cv-qualifiers are ignored.](#NAMEOF_TYPE_EXPR) * [`NAMEOF_TYPE_EXPR` macro that obtains string name type of expression, reference and cv-qualifiers are ignored.](#NAMEOF_TYPE_EXPR)
* [`NAMEOF_FULL_TYPE_EXPR` macro that obtains string name full type of expression, with reference and cv-qualifiers.](#NAMEOF_FULL_TYPE_EXPR) * [`NAMEOF_FULL_TYPE_EXPR` macro that obtains string name full type of expression, with reference and cv-qualifiers.](#NAMEOF_FULL_TYPE_EXPR)
## Synopsis
* Before use, read the [limitations](limitations.md) of functionality.
* All functions `constexpr` and `noexcept`.
* To check is nameof_type supported compiler use macro `NAMEOF_TYPE_SUPPORTED` or constexpr constant `nameof::is_nameof_type_supported`.
* To check is nameof_enum supported compiler use macro `NAMEOF_ENUM_SUPPORTED` or constexpr constant `nameof::is_nameof_enum_supported`.
## `NAMEOF` ## `NAMEOF`
* Macro that obtains simple (unqualified) string name of variable, function, macro. * Macro that obtains simple (unqualified) string name of variable, function, macro.