Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
27.stringbuf.xsputn.stdcxx-515.cpp
Go to the documentation of this file.
1
27#include <sstream> // for stringstream
28#include <string> // for string
29#include <cassert> // for assert()
30#include <cstddef> // for size_t
31
32int main ()
33{
34 for (std::size_t i = 1; i <= 1024; ++i) {
35 std::stringstream strm;
36 std::string s (i, 'a');
37 strm << s;
38 strm.seekp (-1, std::ios::cur);
39 s.erase (0, 1);
40 strm << "bc";
41 s.append ("bc");
42 assert (strm.str () == s);
43 }
44
45 return 0;
46}
#define i
Definition 17.names.cpp:126
#define s
#define strm
Definition 17.names.cpp:549
#define assert(expr)
Definition _cassert.h:40