High performance C++ framework for concurrent servers
Public Member Functions | List of all members
seastar::weak_ptr< T > Class Template Reference

Detailed Description

template<typename T>
class seastar::weak_ptr< T >

A non-owning reference to an object.

weak_ptr allows one to keep a non-owning reference to an object. When the object is destroyed, it notifies all weak_ptr instances pointing to it. A weak_ptr instance pointing to a destroyed object is equivalent to a nullptr.

The referenced object must inherit from weakly_referencable. weak_ptr instances can only be obtained by calling weak_from_this() on the to-be-referenced object.

See also

#include <seastar/core/weak_ptr.hh>

Public Member Functions

 weak_ptr (std::nullptr_t) noexcept
 weak_ptr (weak_ptr &&o) noexcept
weak_ptroperator= (weak_ptr &&o) noexcept
 operator bool () const noexcept
T * operator-> () const noexcept
T & operator* () const noexcept
T * get () const noexcept
bool operator== (const weak_ptr &o) const noexcept
bool operator!= (const weak_ptr &o) const noexcept

The documentation for this class was generated from the following file: