There are two obvious implementation methods for a buffer in standard stream buffers:
- You can embed a buffer in an object by creating a large area for the object, but avoiding memory allocation for small lines or files.
- You can specify a buffer allocated on the heap and deal with a potentially large buffer by allocating memory.
Depending on the choice of implementation where the buffer lives, you will need a new set of pointer values, or you will want to transfer the pointers as they are. None of the strategies are “better,” and I can present options that combine strategies. Thus, instead of making a choice, you can choose. If your question is why the implementation should [forget] document the choice it made: this is clearly outside of me. My personal guess is that it was assumed that the phase “determined by implementation” would provide freedom of choice, and it was ignored that the consequences were that the implementation should declare its choice (since quotes were discussed: 1.3.10 [defns.impl. defined] - strange without a paragraph number).
source share