Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
4.1.3
-
None
-
all
Description
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;
}
Attachments
Issue Links
- relates to
-
STDCXX-259 std::ostream::operator<<(int) fails to call width(0) on exception
- Resolved
-
STDCXX-206 std::operator<<(ostream, string) doesn't call width(0) on ios_base::failure
- Closed