Home | History | Annotate | Download | only in alg.remove

Lines Matching refs:ia

33     int ia[] = {0, 1, 2, 3, 4, 2, 3, 4, 2};
34 const unsigned sa = sizeof(ia)/sizeof(ia[0]);
35 // int* r = std::remove_if(ia, ia+sa, std::bind2nd(std::equal_to<int>(), 2));
37 int* r = std::remove_if(ia, ia+sa, std::ref(cp));
38 assert(r == ia + sa-3);
39 assert(ia[0] == 0);
40 assert(ia[1] == 1);
41 assert(ia[2] == 3);
42 assert(ia[3] == 4);
43 assert(ia[4] == 3);
44 assert(ia[5] == 4);
59 std::unique_ptr<int> ia[sa];
60 ia[0].reset(new int(0));
61 ia[1].reset(new int(1));
62 ia[2].reset(new int(2));
63 ia[3].reset(new int(3));
64 ia[4].reset(new int(4));
65 ia[5].reset(new int(2));
66 ia[6].reset(new int(3));
67 ia[7].reset(new int(4));
68 ia[8].reset(new int(2));
69 Iter r = std::remove_if(Iter(ia), Iter(ia+sa), pred());
70 assert(base(r) == ia + sa-3);
71 assert(*ia[0] == 0);
72 assert(*ia[1] == 1);
73 assert(*ia[2] == 3);
74 assert(*ia[3] == 4);
75 assert(*ia[4] == 3);
76 assert(*ia[5] == 4);