Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
27.stringbuf.overflow.stdcxx-795.cpp
Go to the documentation of this file.
1
27#include <sstream> // for ostringstream
28#include <string> // for string
29#include <cassert> // for assert()
30#include <cstddef> // for size_t
31
32int main ()
33{
34 std::ostringstream strm;
35 std::string s;
36
37 for (std::size_t i = 1; i <= 1024; ++i) {
38 const char c = char (i);
39 strm << c;
40 s.push_back (c);
41 assert (strm.str () == s);
42 }
43
44 return 0;
45}
#define i
Definition 17.names.cpp:126
#define c
Definition 17.names.cpp:111
#define s
#define strm
Definition 17.names.cpp:549
#define assert(expr)
Definition _cassert.h:40