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
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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: