Function relocatable_component

Synopsis

#include <include/flecs/cpp/component.hpp>

template <typename T>
flecs::entity relocatable_component(const flecs::world &world, const char *name=nullptr)

Description

Trivially relocatable component that can be memcpy'd.

Source

Lines 710-718 in include/flecs/cpp/component.hpp.

template <typename T>
flecs::entity relocatable_component(const flecs::world& world, const char *name = nullptr) {
    flecs::entity result = pod_component<T>(world, name);

    _::register_lifecycle_actions<T>(world.c_ptr(), result.id(),
        true, true, true, false);

    return result;
}