|
13 | 13 |
|
14 | 14 | #include <boost/container/detail/config_begin.hpp> |
15 | 15 | #include <boost/container/detail/iterator.hpp> |
| 16 | +#include <boost/container/detail/compare_functors.hpp> |
16 | 17 | #include "check_equal_containers.hpp" |
17 | 18 | #include "print_container.hpp" |
18 | 19 | #include "input_from_forward_iterator.hpp" |
@@ -102,13 +103,22 @@ bool list_copyable_only(V1 &boostlist, V2 &stdlist, boost::container::dtl::true_ |
102 | 103 | stdlist.insert(stdlist.end(), aux_vect2, aux_vect2 + 50); |
103 | 104 | if(!test::CheckEqualContainers(boostlist, stdlist)) return false; |
104 | 105 |
|
| 106 | + //erase |
105 | 107 | if (1 != erase(boostlist, 25)) |
106 | 108 | return 1; |
| 109 | + if (0 != erase(boostlist, 25)) |
| 110 | + return 1; |
| 111 | + |
107 | 112 | stdlist.erase(boost::container::find(stdlist.begin(), stdlist.end(), 25)); |
108 | 113 | if(!test::CheckEqualContainers(boostlist, stdlist)) return false; |
109 | 114 |
|
110 | | - if (0 != erase(boostlist, 25)) |
| 115 | + //erase_if |
| 116 | + if (1 != erase_if(boostlist, equal_to_value<int>(24))) |
| 117 | + return 1; |
| 118 | + if (0 != erase_if(boostlist, equal_to_value<int>(24))) |
111 | 119 | return 1; |
| 120 | + stdlist.erase(boost::container::find(stdlist.begin(), stdlist.end(), 24)); |
| 121 | + if(!test::CheckEqualContainers(boostlist, stdlist)) return false; |
112 | 122 | } |
113 | 123 | { //List(const List &, alloc) |
114 | 124 | ::boost::movelib::unique_ptr<V1> const pv1 = ::boost::movelib::make_unique<V1>(boostlist, typename V1::allocator_type()); |
|
0 commit comments