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

Methods

operator std::string_viewReturns the name of a given type.
valueReturns the name of a given type.

Source

Lines 135-147 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(); }
};





Add Discussion

Log in to comment