You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Martin Sebor (JIRA)" <ji...@apache.org> on 2006/07/11 23:45:31 UTC

[jira] Resolved: (STDCXX-205) std::operator<<(ostream, string) calls width(0) regardless of sentry

     [ http://issues.apache.org/jira/browse/STDCXX-205?page=all ]
     
Martin Sebor resolved STDCXX-205:
---------------------------------

    Fix Version: 4.2
     Resolution: Fixed

Fixed by the referenced patch. Tested in http://svn.apache.org/repos/asf/incubator/stdcxx/trunk/tests/strings/21.string.io.cpp.

> std::operator<<(ostream, string) calls width(0) regardless of sentry
> --------------------------------------------------------------------
>
>          Key: STDCXX-205
>          URL: http://issues.apache.org/jira/browse/STDCXX-205
>      Project: C++ Standard Library
>         Type: Bug

>   Components: 21. Strings
>     Versions: 4.1.3
>  Environment: all
>     Reporter: Anton Pevtsov
>     Assignee: Martin Sebor
>     Priority: Minor
>      Fix For: 4.2

>
> The following test fails:
> #include <iostream>
> #include <sstream>
> #include <string>
> #include <cassert>
> int main(int argc, char* argv[])
> {
>     std::string str ("abcdefghijk");
>     std::ostringstream os;
>     const std::streamsize width = 2;
>     os.width (width);
>     os.clear (std::ios_base::failbit);
>     os << str;
>     assert (os.width () == width);
>     return 0;
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira