7#include "webcface/common/webcface-config.h"
22 template <
typename... Args,
23 typename std::enable_if_t<
24 (!std::is_same_v<std::decay_t<Args>,
SafeGlobal> && ...),
25 std::nullptr_t> =
nullptr>
27 : obj(std::forward<Args>(args)...), alive(true) {}
33 operator bool()
const {
return alive; }
Definition safe_global.h:13
SafeGlobal & operator=(const SafeGlobal &)=delete
SafeGlobal & operator=(SafeGlobal &&)=delete
T & operator*()
Definition safe_global.h:34
T * operator->()
Definition safe_global.h:38
SafeGlobal(const SafeGlobal &)=delete
SafeGlobal(Args &&...args)
Definition safe_global.h:26
SafeGlobal(SafeGlobal &&)=delete
~SafeGlobal()
Definition safe_global.h:32
SafeGlobal< T > safeGlobal(T obj)
Definition safe_global.h:45
#define WEBCFACE_NS_END
Definition webcface-config.h:118
#define WEBCFACE_NS_BEGIN
Definition webcface-config.h:117