You're under a misapprehension - doing iss.basic_ios<char>::rdbuf(oss.rdbuf())
only changes the internal pointer of the input string stream to point to the other output string stream's buffer. It has no affect on the content of the internal buffer of iss
(i.e there is no transfer of data).
As far as I know the get area of an input string stream can be invalid and unused entirely by its implementation. I don't think there's any way to change that.