This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.
Section: 27.8.4 [ostringstream] Status: NAD Submitter: Matthias Mueller Opened: 1998-05-27 Last modified: 2016-12-23
Priority: Not Prioritized
View all other issues in [ostringstream].
View all issues with NAD status.
In a comp.lang.c++.moderated Matthias Mueller wrote:
"We are not sure how to interpret the CD2 (see 27.3 [iostream.forward], 126.96.36.199 [ostringstream.cons], 188.8.131.52 [stringbuf.cons]) with respect to the question as to what the correct initial positions of the write and read pointers of a stringstream should be."
"Is it the same to output two strings or to initialize the stringstream with the first and to output the second?"
[PJ Plauger, Bjarne Stroustrup, Randy Smithey, Sean Corfield, and Jerry Schwarz have all offered opinions; see reflector messages lib-6518, 6519, 6520, 6521, 6523, 6524.]
The LWG believes the Standard is correct as written. The behavior of stringstreams is consistent with fstreams, and there is a constructor which can be used to obtain the desired effect. This behavior is known to be different from strstreams.