logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Author

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

                                                    libstdc++          std::enable_shared_from_this<_Tp>(3cxx)

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

Name

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

Synopsis

       #include <memory>

   PublicMemberFunctionsshared_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

   ProtectedMemberFunctionsenable_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

See Also