Lines Matching refs:Container

33 template<typename Container>
34 inline void CheckNoAllocations(Container&) { in CheckNoAllocations() argument
39 template <typename Container>
41 typename Container::value_compare& val_comp;
42 typename Container::key_compare& key_comp;
44 OrderChecker(typename Container::value_compare& v_comp, typename Container::key_compare& k_comp) in OrderChecker()
47 …bool operator()(const typename Container::value_type& lhs, const typename Container::value_type& r… in operator()
48 if (AllowMultimapping<Container>::value) in operator()
50 … return !val_comp(rhs, lhs) && !key_comp(Value<Container>::key(rhs), Value<Container>::key(lhs)); in operator()
51 … return val_comp(lhs, rhs) && key_comp(Value<Container>::key(lhs), Value<Container>::key(rhs)); in operator()
55 template <typename Container>
56 void check_container_order( const Container& cont ) { in check_container_order()
58 typename Container::key_compare key_comp = cont.key_comp(); in check_container_order()
59 typename Container::value_compare value_comp = cont.value_comp(); in check_container_order()
60 OrderChecker<Container> check_order(value_comp, key_comp); in check_container_order()
69 template <typename Container>
71 Container cont; in test_ordered_methods()
72 const Container& ccont = cont; in test_ordered_methods()
78 cont.insert(Value<Container>::make(r)); in test_ordered_methods()
84 typename Container::value_compare val_comp = cont.value_comp(); in test_ordered_methods()
85 typename Container::iterator l_bound_check, u_bound_check; in test_ordered_methods()
90 REQUIRE_MESSAGE(*it == Value<Container>::make(key), "equal_range contains wrong value"); in test_ordered_methods()
96 if (!val_comp(*it, Value<Container>::make(key)) && l_bound_check == cont.end()) { in test_ordered_methods()
99 if (val_comp(Value<Container>::make(key), *it) && u_bound_check == cont.end()) { in test_ordered_methods()
105 typename Container::range_type cont_range = cont.range(); in test_ordered_methods()
106 typename Container::const_range_type ccont_range = ccont.range(); in test_ordered_methods()
110 typename Container::iterator l_bound = cont.lower_bound(key); in test_ordered_methods()
111 typename Container::iterator u_bound = cont.upper_bound(key); in test_ordered_methods()
116 using const_iterator = typename Container::const_iterator; in test_ordered_methods()
127 template <typename Container, typename CheckElementState = std::false_type>
129 test_basic_common<Container, CheckElementState>(); in test_basic()
130 test_ordered_methods<Container>(); in test_basic()
133 template <typename Container>
137 Container cont; in test_concurrent_order()
144 cont.insert(Value<Container>::make(i)); in test_concurrent_order()
148 cont.insert(Value<Container>::make(i)); in test_concurrent_order()
156 template <typename Container>
158 test_concurrent_common<Container>(asymptotic);
159 test_concurrent_order<Container>();
288 template <template <typename...> class Container, typename... Args>
290 check_heterogeneous_functions_key_int_impl<Container<Args..., TransparentLess>>();
293 template <template <typename...> class Container, typename... Args>
295 check_heterogeneous_functions_key_string_impl<Container<Args..., TransparentLess>>();
298 template <typename Container>
300 static_assert(std::is_same<typename Container::key_type, int>::value,
303 Container c;
304 const Container& cc = c;
308 c.insert(Value<Container>::make(i));
311 if (AllowMultimapping<Container>::value) {
312 c.insert(Value<Container>::make(0));
327 template <typename Container>
330 Container c1, c2;
333 c1.insert(Value<Container>::make(1));
336 c2.insert(Value<Container>::make(1));
339 c2.insert(Value<Container>::make(2));