Function resolve_type

Synopsis

#include <src/entt/meta/resolve.hpp>

meta_type resolve_type(const id_type id) noexcept

Description

Returns the meta type associated with a given type id, if any.

Parameters:

id - Unique identifier.

Return
The meta type associated with the given type id, if any.

Mentioned in

Source

Lines 50-53 in src/entt/meta/resolve.hpp.

[[nodiscard]] inline meta_type resolve_type(const id_type id) ENTT_NOEXCEPT {
    internal::meta_range range{*internal::meta_context::global()};
    return std::find_if(range.begin(), range.end(), [id](const auto &curr) { return curr.type_id == id; }).operator->();
}





Add Discussion

Log in to comment