Base that can recover a Shared from an object owned by one.
More...
#include <StormByte/safe/pointers.hxx>
template<class T>
class StormByte::Safe::EnableSharedFromThis< T >
Base that can recover a Shared from an object owned by one.
- Template Parameters
-
MakeShared links the embedded observer after construction. Calling SharedFromThis before that link throws ExpiredWeakPointerError.
◆ EnableSharedFromThis() [1/3]
Construct an unlinked base.
◆ EnableSharedFromThis() [2/3]
Copy does not copy the observer.
- Parameters
-
◆ EnableSharedFromThis() [3/3]
Move does not move the observer.
- Parameters
-
◆ ~EnableSharedFromThis()
Destroy the embedded observer.
◆ operator=() [1/2]
Assignment does not replace the observer.
- Parameters
-
- Returns
- This base.
◆ operator=() [2/2]
Move assignment does not replace the observer.
- Parameters
-
- Returns
- This base.
◆ SharedFromThis()
Recover an owner of this object.
- Returns
- Owner sharing the control block created by MakeShared.
- Exceptions
-
◆ MakeShared
template<class T>
template<class U, class... Args>
| Shared< U > MakeShared |
( |
Args && | ... | ) |
|
|
friend |
The documentation for this class was generated from the following file: