std::enable_shared_from_this(3cxx)

std::enable_shared_from_this3cxx

Base class allowing use of the member function shared_from_this.

Usage

#include <memory>

Public Member Functions

shared_ptr< _Tp > shared_from_this ()
shared_ptr< const _Tp > shared_from_this () const

weak_ptr< _Tp > weak_from_this () noexcept
weak_ptr< const _Tp > weak_from_this () const noexcept

Protected Member Functions

enable_shared_from_this (const enable_shared_from_this &) noexcept
enable_shared_from_this & operator= (const enable_shared_from_this &) noexcept

Friends

const enable_shared_from_this * __enable_shared_from_this_base (const __shared_count<> &, const enable_shared_from_this *__p)
template<typename , _Lock_policy > class __shared_ptr

Detailed Description

template<typename _Tp>

class std::enable_shared_from_this< _Tp >"Base class allowing use of the member function shared_from_this.

Since

C++11

Member Function Documentation

template<typename _Tp > weak_ptr< const _Tp > std::enable_shared_from_this< _Tp >::weak_from_this () const [inline], [noexcept]

Get a weak_ptr referring to the object that has *this as its base.

Since

C++17

template<typename _Tp > weak_ptr< _Tp > std::enable_shared_from_this< _Tp >::weak_from_this () [inline], [noexcept]

Get a weak_ptr referring to the object that has *this as its base.

Since

C++17

Releases

7 releases since Debian 7 (Wheezy); the text changed 6 times.

  1. 7
  2. 8
  3. 9
  4. 10
  5. 11
  6. 12
  7. 13

Author

Generated automatically by Doxygen for libstdc++ from the source code.

From libstdc++-12-doc 12.4.0-5 in Debian 13 (Trixie). Also shipped by libstdc++-13-doc, libstdc++-14-doc. Parsed by carta from the page's man source.