STD::ENABLE_SHARED_FROM_THIS(3)
π NAME π
okay so bestie, meet std::enable_shared_from_this< _Tp > β the base class that lets you use the member function shared_from_this. that's literally her whole job and she does it flawlessly, no cap π«Ά
β¨ SYNOPSIS β¨
#include <memory>
πΈ Public Member Functions πΈ
shared_ptr< _Tp > shared_from_this ()β hands you back ashared_ptrto the object, the non-const girlie version πshared_ptr< const _Tp > shared_from_this () constβ same energy butconst, for when you're being polite and not touching anything π
π Protected Member Functions π
enable_shared_from_this (const enable_shared_from_this &) noexceptβ the copy constructor, markednoexceptso she literally cannot throw, periodt β¨enable_shared_from_this & operator= (const enable_shared_from_this &) noexceptβ the copy assignment operator, alsonoexcept, also unbothered π
π¦ Friends π¦
const enable_shared_from_this * __enable_shared_from_this_base (const __shared_count<> &, const enable_shared_from_this *__p)β yes bestie, that's the whole signature,__pand all, iykyk πtemplate<typename, _Lock_policy> class __shared_ptrβ declared as a friend class, template params unnamed, we respect it π
π 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β she's been iconic since C++11, a true legacy queen π
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. (not a human author, just a very organized robot doing her thing π€π)
and that's the whole vibe check bestie β this page came to you straight from the libstdc++ manual, filed understd::enabl...this< _Tp >(3)because apparently even the title got the ellipsis treatment ππ go forth andshared_from_this()responsibly πΈπ¦
π¦ where this page comes from
- arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
- fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- fedora 44: libstdc++-docs 16.2.1-2.fc44
- fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms