mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 23:17:45 +00:00
AK: Improve smart pointer ergonomics a bit.
This commit is contained in:
parent
d5dec1922b
commit
3f6408919f
17 changed files with 49 additions and 31 deletions
|
@ -107,6 +107,9 @@ public:
|
|||
CALLABLE_WHEN(unconsumed) T& operator*() { ASSERT(m_ptr); return *m_ptr; }
|
||||
CALLABLE_WHEN(unconsumed) const T& operator*() const { ASSERT(m_ptr); return *m_ptr; }
|
||||
|
||||
CALLABLE_WHEN(unconsumed) operator T*() { ASSERT(m_ptr); return m_ptr; }
|
||||
CALLABLE_WHEN(unconsumed) operator const T*() const { ASSERT(m_ptr); return m_ptr; }
|
||||
|
||||
private:
|
||||
Retained() { }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue