Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
21.string.replace.stdcxx-175.cpp
Go to the documentation of this file.
1
27#include <cassert>
28#include <string>
29#include <stdexcept>
30
31int main ()
32{
33 std::string s (4095, 'a');
34
35 try {
36 s.replace (0, 1, "a", s.max_size () + 1);
37 assert (!"Expect length error, got nothing");
38 }
39 catch (std::length_error&) {
40 }
41
42 return 0;
43}
#define s
#define assert(expr)
Definition _cassert.h:40