object: rename T as SelfT for owned_ptr
This commit is contained in:
parent
e87ad28599
commit
e284512d0d
15
object.hpp
15
object.hpp
@ -161,10 +161,10 @@ namespace cruft::vk {
|
|||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
template <typename T>
|
template <typename SelfT>
|
||||||
class owned_ptr {
|
class owned_ptr {
|
||||||
public:
|
public:
|
||||||
owned_ptr (T &&_self, owner_t<T> &_owner):
|
owned_ptr (SelfT &&_self, owner_t<SelfT> &_owner):
|
||||||
m_self (std::move (_self)),
|
m_self (std::move (_self)),
|
||||||
m_owner (_owner)
|
m_owner (_owner)
|
||||||
{ ; }
|
{ ; }
|
||||||
@ -184,16 +184,19 @@ namespace cruft::vk {
|
|||||||
// justify the work.
|
// justify the work.
|
||||||
owned_ptr& operator= (owned_ptr &&rhs) = delete;
|
owned_ptr& operator= (owned_ptr &&rhs) = delete;
|
||||||
|
|
||||||
T& operator* ()&
|
const SelfT& get (void) const& { return m_self; }
|
||||||
|
SelfT& get (void)& { return m_self; }
|
||||||
|
|
||||||
|
SelfT& operator* ()&
|
||||||
{ return m_self; }
|
{ return m_self; }
|
||||||
|
|
||||||
T*
|
SelfT*
|
||||||
operator-> ()&
|
operator-> ()&
|
||||||
{ return &m_self; }
|
{ return &m_self; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
T m_self;
|
SelfT m_self;
|
||||||
owner_t<T> &m_owner;
|
owner_t<SelfT> &m_owner;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user