cpp/io/strstreambuf

is a std whose associated character sequence is a character array, which may be constant (e.g. a string literal), modifyable but not dynamic (e.g. a stack-allocated array), or dynamic, in which case the may be allowed to reallocate the array as necessary to accommodate output (e.g. by calling  and  or user-provided functions).

Typical implementation of a holds four private data members:

@1@ buffer state, a bitmask type which can represent any combination of the four values "allocated" (destructor will deallocate), "constant" (output not allowed), "dynamic" (output may reallocate), or "frozen" (deallocation and reallocation are not allowed) @2@ allocated buffer size (the beginning of the buffer does not need a special data member, it may be stored in the inherited pointer std) @3@ pointer to user-provided allocation function @4@ pointer to user-provided deallocation function.