1#ifndef NNGN_UTILS_SCOPED_H
2#define NNGN_UTILS_SCOPED_H
10#define NNGN_SCOPED(...) NNGN_ANON_DECL(nngn::make_scoped(__VA_ARGS__))
16template<
typename T,
typename F,
typename ...Args>
18 std::is_same_v<T, nngn::empty>,
24template<
typename T,
typename F,
typename ...Args>
35 constexpr const T &
operator*()
const {
return this->
template arg<0>(); }
36 constexpr T &
operator*() {
return this->
template arg<0>(); }
39 constexpr const T *
get()
const {
return &**
this; }
40 constexpr T *
get() {
return &**
this; }
43template<
typename F,
typename ...Ts>
46 std::forward<F>(
f), std::forward<Ts>(ts)...);
49template<
typename T,
typename F,
typename ...Ts>
52 std::forward<T>(t), std::forward<F>(
f), std::forward<Ts>(ts)...);
Static container for a callable and its arguments.
Definition delegate.h:43
constexpr T * operator->()
Definition scoped.h:38
constexpr T * get()
Definition scoped.h:40
constexpr const T & operator*() const
Definition scoped.h:35
constexpr const T * operator->() const
Definition scoped.h:37
detail::scoped_base< T, F, Args... > Base
Definition scoped.h:26
constexpr T & operator*()
Definition scoped.h:36
constexpr const T * get() const
Definition scoped.h:39
scoped(T t, F f, Args ...a)
Definition scoped.h:32
scoped(F f, Args ...a)
Definition scoped.h:31
~scoped(void)
Definition scoped.h:34
std::conditional_t< std::is_same_v< T, nngn::empty >, delegate< F, Args... >, delegate< F, T, Args... > > scoped_base
Definition scoped.h:17
auto make_scoped_obj(T &&t, F &&f, Ts &&...ts)
Definition scoped.h:50
auto make_scoped(F &&f, Ts &&...ts)
Definition scoped.h:44
#define F(...)
Definition pp.cpp:12
move
Definition camera.lua:57
#define NNGN_MOVE_ONLY(x)
Definition utils.h:39