std::string s2(s1.size()); std::copy(std::begin(s1), std::end(s1), std::begin(s2));