<spanstream>
will debut in C++23 (see cppreference). According to the proposal, they are string-streams with std::span
based buffers.
My questions are:
- Does
std::spanstream
have somewhat equivalent uses of the oldstd::strstream
(orstrstream
deprecated in C++ 98)? - What will be the benefits of using them after the full release of C++ 23?
std::strstream
but I guess you mean the old pre-standard (and therefore not in any namespace)strstream
? – Gruberstrstream
is the only way to do that. – Pithstd::stringstream
does, but instead of having astring
object you can't manage,std::spanstream
will use aspan
(buffer) that you give it for the stream contents. – Chartist