You must inherit publicly from std::enable_shared_from_this. Inheriting privately doesn’t help – std::shared_ptr can’t access the base class and set it up properly.
You must inherit publicly from std::enable_shared_from_this. Inheriting privately doesn’t help – std::shared_ptr can’t access the base class and set it up properly.