Function patch

Synopsis

#include <src/entt/entity/handle.hpp>

template <typename Component, typename... Func>
decltype(auto) patch(Func &&... func) const

Description

Patches the given component for a handle.

See
basic_registry::patch
Template Parameters

Component - Type of component to patch.

Func - Types of the function objects to invoke.

Parameters

func - Valid function objects.

Return
A reference to the patched component.

Source

Lines 152-156 in src/entt/entity/handle.hpp.

template<typename Component, typename... Func>
decltype(auto) patch(Func &&... func) const {
    static_assert(((sizeof...(Type) == 0) || ... || std::is_same_v<Component, Type>));
    return reg->template patch<Component>(entt, std::forward<Func>(func)...);
}





Add Discussion

Log in to comment