Function type_id

Summary

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

(1) template <typename Type>
    type_info type_id() noexcept

(2) template <typename Type>
    type_info type_id(Type &&) noexcept

Function overload

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.

Return
The type info object for the given type.

Mentioned in

Source

Lines 227-234 in src/entt/core/type_info.hpp.

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

Synopsis

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

template <typename Type>
type_info type_id(Type &&) noexcept

Description

Returns the type info object for a given type.

Template Parameters

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

Return
The type info object for the given type.

Mentioned in

Source

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

template<typename Type>
type_info type_id(Type &&) ENTT_NOEXCEPT {
    return type_id<Type>();
}





Add Discussion

Log in to comment