Cpp-Primer icon indicating copy to clipboard operation
Cpp-Primer copied to clipboard

issues about exercise 13.49

Open LvXinTao opened this issue 4 years ago • 0 comments

Hi.In the given answer, I see that you use String::String(String &&s) NOEXCEPT : elements(s.elements), end(s.end) { s.elements = s.end = nullptr; }
instead of String::String(String&&s)NOEXCEPT :elements(std::move(s.elements)),end(std::move(s.end)) { ... } in the initialized list of move constructor "String(String&&)", and so as in StrVec. My question is that: would that do the COPY instead of MOVE?

LvXinTao avatar Aug 01 '20 14:08 LvXinTao