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
Make String move constructor move instead of copy.
The move constructor String::String(String&&) and String::operator=(String&&)
now perform move instead of copy.
Remove String(StringSumHelper&&) constructor because having it makes no sense:
String(String&&) takes care of it - you can pass either String&& or
StringSumHelper&& to this constructor. StringSumHelper is derived from String
and has no data members other than those inherited from String. Even if it did
have some extra data members, truncation would have to happen during move, and
normally that is something you don't want.
0 commit comments