This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
I have been planning to raise this question again for a long time. I
first raised it about ~2 years ago.
For different newly initialized streams I have these results:
Testing tellp.
ostringstream.tellp() = -1
ostrstream.tellp() = 0
ofstream.tellp() = 0
ftell() = 0
I do not get why ostringstream is special. If I recall correctly, last
time I brought this up the conclusion was that the standard does not
say what exactly should be returned. So IMHO it was an QoI issue wheter
to return '-1' or '0'. I think Nathan agrred with me?
However, I tried to create a patch that made all the streams behave
equally (returning '0'). I got a response that the patch was wrong, I
then realized that I would not be able to get it right. The issue died
after that.
Anyway this is the prog I use to show inital values:
Attachment:
stringstreamtest.C
Description: test tellp on init streams
-- Lgb
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |