Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
23.vector.cons.stdcxx-294.cpp
Go to the documentation of this file.
1
29#include <assert.h>
30#include <vector>
31
32int main()
33{
34 static const int a[] = { 1, 2, 3, 4, 5 };
35 std::vector<int> v (a, a + sizeof a / sizeof *a);
36
37 v.insert (v.begin () + 2, 2, -1);
38
39 static const int b[] = { 1, 2, -1, -1, 3, 4, 5 };
40
41 const int pass = v == std::vector<int>(b, b + sizeof b / sizeof *b);
42
43 assert (pass);
44
45 return 1 - pass;
46}
#define v
Definition 17.names.cpp:138
#define a
Definition 17.names.cpp:109
#define b
Definition 17.names.cpp:110
#define assert(expr)
Definition _cassert.h:40