Function resolve_id

Synopsis

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

meta_type resolve_id(const id_type id) noexcept

Description

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

Parameters:

id - Unique identifier.

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

Mentioned in

Source

Lines 39-42 in src/entt/meta/resolve.hpp.

[[nodiscard]] inline meta_type resolve_id(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.id == id; }).operator->();
}





Add Discussion

Log in to comment