How does stringstream work internally?

I ask in the context of performance. Is stringstream just a string / vector, so writing to it can cause all its content to be copied to a larger piece of memory or to be done in a more complicated way (for example, a list of strings or something else)?

+5
source share
2 answers

To the standard library provider, how to implement stringstream (or any library function, for that matter). You can look at the sstream header supplied with your compiler to find out how it is implemented there. This is on the theoretical side ...

, ostringstream . , , , , , , .

, ostringstream , Boost.Karma. , Boost.Karma, , , , , , Karma get-go.

+3

27.7.3/1 , basic_ostringstream a basic_stringbuf. , 27.7.1.3/8 , basic_stringbuf (, , O (1) ).

, , " ". , deque ( , - /) .

+4

All Articles