Function defer

Synopsis

#include <include/flecs/addons/cpp/world.hpp>

template <typename Func>
void defer(const Func &func) const

Description

Defer all operations called in function. If the world is already in deferred mode, do nothing.

Mentioned in

Source

Lines 757-762 in include/flecs/addons/cpp/world.hpp.

template <typename Func>
void defer(const Func& func) const {
    ecs_defer_begin(m_world);
    func();
    ecs_defer_end(m_world);
}