Why doesn't std::stringstream work with std::string_view?
The std::stringstream initialization constructor accepts const string& as a parameter: explicit stringstream (const string& str, ios_base::openmode which = ios_base::in | ios_base::out); This interface was reasonable in C++98, but since C++17 we have std::string_view as a cheaper alternative of the class representing a string. The std::stringstream class doesn’t modify the string it accepts, doesn’t own it,… Read More Why doesn't std::stringstream work with std::string_view?