Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
4.1.3
-
None
-
None
Description
When I call tellp() on an empty stringstream I get -1 instead of 0.
#include <cassert>
#include <sstream>
main()
{
std::ostringstream out;
std::ios::pos_type pos = out .tellp () ;
assert (pos == 0);
return 0;
}
test: test.cpp:9: int main(): Assertion `pos == 0' failed.
Aborted
Attachments
Issue Links
- duplicates
-
STDCXX-295 [LWG #453] basic_stringbuf::seekoff need not always fail for an empty stream
- Closed