The String::String(String&&) and String::operator=(String&&) do not perform expected operation i.e. they don't move, but instead they copy.