Function meta


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

template <typename Type>
auto meta() noexcept


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 716-721 in src/entt/meta/factory.hpp.

template<typename Type>
[[nodiscard]] auto meta() ENTT_NOEXCEPT {
    auto * const node = internal::meta_info<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