You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
------------------ 原始邮件 ------------------
发件人: "guaguaupup/cpp_interview" ***@***.***>;
发送时间: 2023年10月10日(星期二) 下午4:50
***@***.***>;
***@***.******@***.***>;
主题: Re: [guaguaupup/cpp_interview] 手撕代码里面的手写String类里面的移动构造函数是不是错了啊? (Issue #10)
感谢提醒,我改一下
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
String::String(const String&& other)
{
m_data = other.m_data;
other.m_data = nullptr;
}
传入const的对象怎么修改other.m_data呢?
应该改成
String::String(String &&other)
{
m_data = other.m_data;
other.m_data = nullptr;
}
The text was updated successfully, but these errors were encountered: