Function type_id

Synopsis

#include <src/entt/core/type_info.hpp>

template <typename Type>
type_info type_id() noexcept

Description

Returns the type info object for a given type.

Template Parameters

Type - Type for which to generate a type info object.

Returns
The type info object for the given type.

Mentioned in

Source

Lines 238-245 in src/entt/core/type_info.hpp.

template<typename Type>
type_info type_id() ENTT_NOEXCEPT {
    return type_info{
        type_seq<std::remove_cv_t<std::remove_reference_t<Type>>>::value(),
        type_hash<std::remove_cv_t<std::remove_reference_t<Type>>>::value(),
        type_name<std::remove_cv_t<std::remove_reference_t<Type>>>::value()
    };
}





Add Discussion

Log in to comment