3 // Copyright (C) 2005, 2006 Free Software Foundation, Inc.
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the terms
7 // of the GNU General Public License as published by the Free Software
8 // Foundation; either version 2, or (at your option) any later
11 // This library is distributed in the hope that it will be useful, but
12 // WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this library; see the file COPYING. If not, write to
18 // the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
19 // MA 02111-1307, USA.
21 // As a special exception, you may use this file as part of a free
22 // software library without restriction. Specifically, if other files
23 // instantiate templates or use macros or inline functions from this
24 // file, or you compile this file and link it with other files to
25 // produce an executable, this file does not by itself cause the
26 // resulting executable to be covered by the GNU General Public
27 // License. This exception does not however invalidate any other
28 // reasons why the executable file might be covered by the GNU General
31 // Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
33 // Permission to use, copy, modify, sell, and distribute this software
34 // is hereby granted without fee, provided that the above copyright
35 // notice appears in all copies, and that both that copyright notice
36 // and this permission notice appear in supporting documentation. None
37 // of the above authors, nor IBM Haifa Research Laboratories, make any
38 // representation about the suitability of this software for any
39 // purpose. It is provided "as is" without express or implied
43 * @file defs_fn_imps.hpp
44 * Containsert a random regression test for a specific container type.
52 // General container types.
54 typedef typename
Cntnr::size_type test_size_type
;
56 typedef typename
Cntnr::difference_type difference_type
;
66 node_iterator_defs(__gnu_pbds::detail::integral_constant
<int,
67 container_traits::order_preserving
>());
77 typedef typename
Cntnr::key_type test_key_type
;
79 typedef typename
Cntnr::key_reference test_key_reference
;
81 typedef typename
Cntnr::const_key_reference test_const_key_reference
;
83 typedef typename
Cntnr::key_pointer test_key_pointer
;
85 typedef typename
Cntnr::const_key_pointer test_const_key_pointer
;
93 typedef typename
Cntnr::mapped_type test_mapped_type
;
95 typedef typename
Cntnr::mapped_reference test_mapped_reference
;
98 typename
Cntnr::const_mapped_reference
99 test_const_mapped_reference
;
101 typedef typename
Cntnr::mapped_pointer test_mapped_pointer
;
103 typedef typename
Cntnr::const_mapped_pointer test_const_mapped_pointer
;
111 typedef typename
Cntnr::value_type test_value_type
;
113 typedef typename
Cntnr::reference test_reference
;
115 typedef typename
Cntnr::const_reference test_const_reference
;
117 typedef typename
Cntnr::pointer test_pointer
;
119 typedef typename
Cntnr::const_pointer test_const_pointer
;
127 typedef __gnu_pbds::container_traits
< Cntnr
> test_container_traits
;
129 typedef typename
test_container_traits::container_category test_container_category
;
132 typename
test_container_traits::invalidation_guarantee
133 test_invalidation_guarantee
;
137 test_order_preserving
=
138 test_container_traits::order_preserving
143 test_erase_can_throw
=
144 test_container_traits::erase_can_throw
153 typedef typename
Cntnr::point_iterator test_point_iterator
;
155 typedef typename
Cntnr::const_point_iterator const_test_point_iterator
;
157 typedef typename
Cntnr::iterator test_iterator
;
159 typedef typename
Cntnr::const_iterator const_test_iterator
;
165 node_iterator_defs(__gnu_pbds::detail::false_type
)
171 node_iterator_defs(__gnu_pbds::detail::true_type
)
173 typedef typename
Cntnr::node_iterator test_node_iterator
;
175 typedef typename
Cntnr::const_node_iterator test_const_node_iterator
;
183 typedef typename
Cntnr::allocator test_allocator
;
185 policy_defs(typename
Cntnr::container_category());
191 policy_defs(__gnu_pbds::basic_hash_tag
)
193 typedef typename
Cntnr::hash_fn test_hash_fn
;
195 typedef typename
Cntnr::eq_fn test_eq_fn
;
197 typedef typename
Cntnr::resize_policy test_resize_policy
;
203 policy_defs(__gnu_pbds::cc_hash_tag
)
205 policy_defs(__gnu_pbds::basic_hash_tag());
207 typedef typename
Cntnr::comb_hash_fn test_comb_hash_fn
;
213 policy_defs(__gnu_pbds::gp_hash_tag
)
215 policy_defs(__gnu_pbds::basic_hash_tag());
217 typedef typename
Cntnr::comb_probe_fn test_comb_probe_fn
;
219 typedef typename
Cntnr::probe_fn test_probe_fn
;
225 policy_defs(__gnu_pbds::tree_tag
)
227 typedef typename
Cntnr::cmp_fn test_cmp_fn
;
229 typedef typename
Cntnr::node_update test_node_update
;
235 policy_defs(__gnu_pbds::list_update_tag
)
237 typedef typename
Cntnr::eq_fn test_eq_fn
;
239 typedef typename
Cntnr::update_policy test_update_policy
;
245 policy_defs(__gnu_pbds::pat_trie_tag
)
247 typedef typename
Cntnr::e_access_traits e_access_traits
;