25 requires std::convertible_to<TT*, T*>
31 requires std::convertible_to<TT*, T*>
38 requires std::convertible_to<TT*, T*>
43 requires std::convertible_to<TT*, T*>
59 operator bool() const noexcept;
75 [[nodiscard]]
std::
size_t
85 [[nodiscard]]
std::shared_ptr<T>
T * get() const
If this is a strong pointer, return the raw pointer.
bool expired() const
Return true if there is a non-zero strong count.
bool convertToStrong()
If this is a weak pointer, attempt to convert it to a strong pointer.
SharedWeakCachePointer(SharedWeakCachePointer const &rhs)
SharedWeakCachePointer & operator=(SharedWeakCachePointer const &rhs)
bool convertToWeak()
If this is a strong pointer, attempt to convert it to a weak pointer.
SharedWeakCachePointer & operator=(std::shared_ptr< TT > &&rhs)
bool isStrong() const
Return true is this represents a strong pointer.
void reset()
Set the pointer to null, decrement the appropriate ref count, and run the appropriate release action.
std::size_t useCount() const
If this is a strong pointer, return the strong count.
SharedWeakCachePointer(std::shared_ptr< TT > &&rhs)
bool isWeak() const
Return true is this represents a weak pointer.
SharedWeakCachePointer(SharedWeakCachePointer &&rhs)
std::shared_ptr< T > lock() const
If this is a strong pointer, return the strong pointer.
std::shared_ptr< T > const & getStrong() const
Return a strong pointer if this is already a strong pointer (i.e.
std::variant< std::shared_ptr< T >, std::weak_ptr< T > > combo_
SharedWeakCachePointer(std::shared_ptr< TT > const &rhs)
SharedWeakCachePointer & operator=(std::shared_ptr< TT > const &rhs)
~SharedWeakCachePointer()
SharedWeakCachePointer()=default
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.