48 *
self_ =
static_cast<T*
>(
this);
52 self_ = std::move(o.self_);
53 *
self_ =
static_cast<T*
>(
this);
71 if(
auto pp =
self_.lock()) {
82 return bool(
self_.lock());
86 return !
operator bool();
Allows creation of lua_ptr<T> instances, but does not affect the lifetime of the T itself.
enable_lua_ptr(enable_lua_ptr &&o)
The weak_ptrs are pointing to o's shared_ptr's control block, so to keep existing weak_ptrs valid the...
enable_lua_ptr(const enable_lua_ptr &o)=delete
std::shared_ptr< T * > self_
enable_lua_ptr & operator=(enable_lua_ptr &&o)
T must inherit enable_lua_ptr<T>
lua_ptr(enable_lua_ptr< T > &o)
std::weak_ptr< T * > self_