Apparently, many people dislike that the standard std::enable_shared_from_this class does not allow to invoke shared_from_this() in the constructor.

Guess What: This library is supposed to fill the gap.

The boost library does that too, but it does not allow shared_ptrs to be made inside the destructor and it doesn't provide a release() method to gain ownership of the contained pointer.

Big downside is however, that it's not (yet) made thread-safe.

Features

  • shared_from_this() in Constructor and Destructor
  • Drop-In replacement for std::shared_ptr and std::enable_shared_from_this
  • NOT thread-safe
  • Provides a release() method

Project Activity

See All Activity >

License

GNU General Public License version 2.0 (GPLv2)

Follow shared_from_this() in Constructor

shared_from_this() in Constructor Web Site

Other Useful Business Software
World class QA, 100% done-for-you Icon
World class QA, 100% done-for-you

For engineering teams in search of a solution to design, manage and maintain E2E tests for their apps

MuukTest is a test automation service that combines our own proprietary, AI-powered software with expert QA services to help you achieve world class test automation at a fraction of the in-house costs.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of shared_from_this() in Constructor!

Additional Project Details

Operating Systems

Server Operating Systems

Languages

English

Programming Language

C++

Related Categories

C++ Object Oriented Software, C++ Admin Templates

Registered

2015-11-30