TL;DR

In my opinion, the std::enable_shared_from_this page on cppreference.com has the best example code on the site, to explain what it does. This article is talking about an improvement that can be made to it using C++23’s Explicit object member functions, better known as deducing this. Here’s the godbolt link to the final code!

The best example on cppreference.com

Throughout my many visits to cppreference.com, I have found that most of the documented features…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help