33 return ScopeExit(std::forward<Func>(func));
37 return ce_scope_exit([ptr, func]() {
return (ptr->*func)(); });
40#define CE_SCOPE_EXIT const ::CeresEngine::ScopeExit CE_TOKENPASTE2(_scopeExit, __COUNTER__) = [&]() noexcept
Definition Application.hpp:19
auto move(Vector3 position)
Moves a entity to the given position.
Definition Helpers.hpp:22
auto ce_scope_exit(Func &&func) noexcept
Definition ScopeExit.hpp:32
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Definition ScopeExit.hpp:15
ScopeExit(const ScopeExit &)=delete
ScopeExit(Func &&func) noexcept(std::is_nothrow_move_constructible_v< Func >)
Definition ScopeExit.hpp:18
ScopeExit(ScopeExit &&rhs) noexcept(std::is_nothrow_move_constructible_v< Func >)
Definition ScopeExit.hpp:23
ScopeExit & operator=(const ScopeExit &)=delete
ScopeExit & operator=(ScopeExit &&)=delete
~ScopeExit() noexcept
Definition ScopeExit.hpp:26
Func func
Definition ScopeExit.hpp:16