String streams are not required to store their data in one continuous array. string_view
- this, of course, is an idea of a continuous line.
So no, what you want is impossible. It’s better to wait until C ++ 20 when we get support for moving to / from string streams.
source
share