Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.1.2, 4.1.3
-
None
-
all
Description
lib.facet.num.put.virtuals, p5, Stage 3 is specified to end by the facet calling width(0) before outputting any characters using the facet's iterator. The program below shows that stdcxx fails to do so:
$ cat t.cpp && nice gmake t && ./t
#include <cassert>
#include <ostream>
#include <streambuf>
int main ()
{
struct: std::streambuf {
int_type overflow (int_type)
} buf;
std::ostream out (&buf);
out.width (2);
try
{ out << 1; } catch (...) { }
assert (0 == out.width ());
}
aCC -c -I/nfs/devco/sebor/dev/stdlib/include/ansi -I/usr/include -D_RWSTDDEBUG -D_RWSTD_USE_CONFIG -I/nfs/devco/sebor/dev/stdlib/include -I/build/sebor/aCC-3.27-11s/include -I/nfs/devco/sebor/dev/stdlib/examples/include -Aa +nostl -g +d +w +W392 +W655 +W684 +W818 +W819 +W849 +W229 +W361 t.cpp
aCC t.o -o t -Aa +nostl -Wl,+s -Wl,+vnocompatwarnings -L/build/sebor/aCC-3.27-11s/lib -L/build/sebor/aCC-3.27-11s/lib -lstd11s -lm
Assertion failed: 0 == out.width (), file t.cpp, line 20
ABORT instruction (core dumped)
Attachments
Issue Links
- is related to
-
STDCXX-205 std::operator<<(ostream, string) calls width(0) regardless of sentry
- Closed
-
STDCXX-206 std::operator<<(ostream, string) doesn't call width(0) on ios_base::failure
- Closed