Function meta


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

template <typename Type>
auto meta()


Utility function to use for reflection.

This is the point from which everything starts.
By invoking this function with a type that is not yet reflected, a meta type is created to which it will be possible to attach meta objects through a dedicated factory.

Template Parameters

Type - Type to reflect.

A meta factory for the given type.

Mentioned in


Lines 579-584 in src/entt/meta/factory.hpp.

template<typename Type>
[[nodiscard]] auto meta() ENTT_NOEXCEPT {
    auto *const node = internal::meta_node<Type>::resolve();
    // extended meta factory to allow assigning properties to opaque meta types
    return meta_factory<Type, Type>{&node->prop};

Add Discussion

Log in to comment