incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Brown (JIRA)" <j...@apache.org>
Subject [jira] Created: (STDCXX-332) ostringstream::tellp() returns -1 when the stream is empty
Date Fri, 02 Feb 2007 20:46:05 GMT
ostringstream::tellp() returns -1 when the stream is empty
----------------------------------------------------------

                 Key: STDCXX-332
                 URL: https://issues.apache.org/jira/browse/STDCXX-332
             Project: C++ Standard Library
          Issue Type: Bug
          Components: 27. Input/Output
    Affects Versions: 4.1.3
            Reporter: Mark Brown


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


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message