stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (STDCXX-206) lib.string.io operator << doesn't call width (0) if ios_base::failure exception occurred
Date Fri, 23 Jun 2006 18:26:30 GMT
     [ http://issues.apache.org/jira/browse/STDCXX-206?page=all ]

Martin Sebor reassigned STDCXX-206:
-----------------------------------

    Assign To: Martin Sebor  (was: Anton Pevtsov)

> lib.string.io operator <<  doesn't call width (0) if  ios_base::failure exception
occurred
> ------------------------------------------------------------------------------------------
>
>          Key: STDCXX-206
>          URL: http://issues.apache.org/jira/browse/STDCXX-206
>      Project: C++ Standard Library
>         Type: Bug

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

>
> The following test fails:
> #include <iostream>
> #include <strstream>
> #include <string>
> #include <cassert>
> int main(int argc, char* argv[])
> {
>     std::string str ("abcdefghijk");
>     char buf[10];
>     std::ostrstream os (buf, sizeof(buf));
>     const std::streamsize width = 2;
>     os.width (width);
>     os.exceptions (std::ios_base::failbit | std::ios_base::badbit);
>     try {
>         os << str;
>     }
>     catch (std::ios_base::failure&) {
>     }
>     assert (0 == os.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


Mime
View raw message