cpp/io/basic stringbuf

is a std whose associated character sequence is a memory-resident sequence of arbitrary characters, which can be initialized from or made available as an instance of std.

Typical implementations of hold an object of type std or equivalent resizeable sequence container directly as a data member and use it as both the controlled character sequence (the array where the six pointers of std are pointing to) and as the associated character sequence (the source of characters for all input operations and the target for the output).

In addition, a typical implementation holds a data member of type std to indicate the status of the stream (input-only, output-only, input/output, at-end, etc).