diff --git a/doc/limitations.md b/doc/limitations.md index 72e4370..dcba8ba 100644 --- a/doc/limitations.md +++ b/doc/limitations.md @@ -4,16 +4,18 @@ # 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. * Nameof type returns compiler-specific type name. -* In all cases, reference and cv-qualifiers are ignored by `nameof_type` (that is, `nameof_type() == nameof_type()`). - -* If you need detailed name of full type, use `nameof_full_type`. +* If argument does not have name, occurs the compilation error `"Expression does not have a name."`. # 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. * Enum can't reflect if the enum is a forward declaration. diff --git a/doc/reference.md b/doc/reference.md index dfb61f0..f63d577 100644 --- a/doc/reference.md +++ b/doc/reference.md @@ -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_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` * Macro that obtains simple (unqualified) string name of variable, function, macro.