fix: typo in shared_ptr chapter#32
Conversation
|
您好!这里非常感谢您的修正! 我重新检查了原文上下文,这里的修改是正确的。这条 warning 具体讨论的是“对象尚未被 std::shared_ptr 管理时调用会出错”的行为,因此主语应当是 shared_from_this(),而不是 enable_shared_from_this 本身。 这是我编写时的疏忽,可能给您和其他读者造成了一些困惑,对此表示非常抱歉。由于一些个人原因,我暂时没办法立刻将您的贡献同步到网站中;我计划在 6 月 7 日单独提交一个 PR 来完成网站内容同步。 最后,再次感谢您的帮助! Thank you very much for the correction! I rechecked the surrounding context, and this change is correct. The warning is specifically about the behavior of calling shared_from_this() when the object is not yet managed by a std::shared_ptr, so the subject here should be shared_from_this() rather than enable_shared_from_this itself. This was an oversight on my part when writing the chapter, and I apologize if it caused any confusion for you or other readers. For some personal reasons, I am not able to sync your contribution to the website immediately. I plan to submit a separate PR on June 7 to update the website content accordingly. Thanks again for your help! |
1fc594f
into
Awesome-Embedded-Learning-Studio:main
Brief: Found this typo while I read through this chapter. I believe the author mean
shared_from_thishttps://en.cppreference.com/cpp/memory/enable_shared_from_this/shared_from_this
@Charliechen114514