Struct type_name
Synopsis
#include <src/entt/core/type_info.hpp>
template<typename Type, typename = void>
struct type_name final
Description
Type name.
- Template Parameters
Type
- Type for which to generate a name.
Mentioned in
- Core Functionalities / Built-in RTTI support
- Core Functionalities / Type info
- Core Functionalities / Almost unique identifiers
Methods
operator std::string_view | Returns the name of a given type. | |
value | Returns the name of a given type. |
Source
Lines 124-138 in src/entt/core/type_info.hpp.
template<typename Type, typename = void>
struct type_name final {
/**
* @brief Returns the name of a given type.
* @return The name of the given type.
*/
[[nodiscard]] static constexpr std::string_view value() ENTT_NOEXCEPT {
return internal::type_name<Type>(0);
}
/*! @copydoc value */
[[nodiscard]] constexpr operator std::string_view() const ENTT_NOEXCEPT {
return value();
}
};