41 #ifndef PB_DS_ASSOC_CNTNR_HPP 42 #define PB_DS_ASSOC_CNTNR_HPP 64 #define PB_DS_HASH_BASE \ 65 detail::container_base_dispatch<Key, Mapped, _Alloc, Tag, \ 66 typename __gnu_cxx::typelist::append< \ 67 typename __gnu_cxx::typelist::create4<Hash_Fn, Eq_Fn, Resize_Policy, \ 68 detail::integral_constant<int, Store_Hash> >::type, Policy_Tl>::type>::type 95 template<
typename Key,
99 typename Resize_Policy,
107 typedef typename PB_DS_HASH_BASE base_type;
117 : base_type((
const base_type&)other) { }
119 template<
typename T0>
122 template<
typename T0,
typename T1>
125 template<
typename T0,
typename T1,
typename T2>
128 template<
typename T0,
typename T1,
typename T2,
typename T3>
130 : base_type(t0, t1, t2, t3) { }
132 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4>
134 : base_type(t0, t1, t2, t3, t4) { }
136 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4,
139 : base_type(t0, t1, t2, t3, t4, t5) { }
141 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4,
142 typename T5,
typename T6>
143 basic_hash_table(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6)
144 : base_type(t0, t1, t2, t3, t4, t5, t6) { }
146 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4,
147 typename T5,
typename T6,
typename T7>
148 basic_hash_table(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7)
149 : base_type(t0, t1, t2, t3, t4, t5, t6, t7) { }
151 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4,
152 typename T5,
typename T6,
typename T7,
typename T8>
153 basic_hash_table(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6,
155 : base_type(t0, t1, t2, t3, t4, t5, t6, t7, t8)
160 operator=(
const base_type&);
163 #undef PB_DS_HASH_BASE 166 #define PB_DS_CC_HASH_BASE \ 167 basic_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Resize_Policy, Store_Hash, \ 169 typename __gnu_cxx::typelist::create1<Comb_Hash_Fn>::type, _Alloc> 196 template<
typename Key,
202 bool Store_Hash = detail::default_store_hash,
211 typedef Hash_Fn hash_fn;
213 typedef Resize_Policy resize_policy;
214 typedef Comb_Hash_Fn comb_hash_fn;
229 : base_type(h, e) { }
237 : base_type(h, e, ch) { }
246 const resize_policy& rp)
247 : base_type(h, e, ch, rp) { }
252 template<
typename It>
254 { base_type::copy_from_range(first, last); }
259 template<
typename It>
262 { this->copy_from_range(first, last); }
270 template<
typename It>
273 { this->copy_from_range(first, last); }
282 template<
typename It>
284 const comb_hash_fn& ch)
285 : base_type(h, e, ch)
286 { this->copy_from_range(first, last); }
296 template<
typename It>
298 const comb_hash_fn& ch,
const resize_policy& rp)
299 : base_type(h, e, ch, rp)
300 { this->copy_from_range(first, last); }
303 : base_type((
const base_type&)other)
322 { base_type::swap(other); }
325 #undef PB_DS_CC_HASH_BASE 328 #define PB_DS_GP_HASH_BASE \ 329 basic_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Resize_Policy, Store_Hash, \ 331 typename __gnu_cxx::typelist::create2<Comb_Probe_Fn, Probe_Fn>::type, _Alloc> 359 template<
typename Key,
366 bool Store_Hash = detail::default_store_hash,
375 typedef Hash_Fn hash_fn;
377 typedef Comb_Probe_Fn comb_probe_fn;
378 typedef Probe_Fn probe_fn;
379 typedef Resize_Policy resize_policy;
394 : base_type(h, e) { }
402 : base_type(h, e, cp) { }
412 : base_type(h, e, cp, p) { }
423 const probe_fn& p,
const resize_policy& rp)
424 : base_type(h, e, cp, p, rp) { }
429 template<
typename It>
431 { base_type::copy_from_range(first, last); }
437 template<
typename It>
440 { base_type::copy_from_range(first, last); }
448 template<
typename It>
451 { base_type::copy_from_range(first, last); }
460 template<
typename It>
462 const comb_probe_fn& cp)
463 : base_type(h, e, cp)
464 { base_type::copy_from_range(first, last); }
474 template<
typename It>
476 const comb_probe_fn& cp,
const probe_fn& p)
477 : base_type(h, e, cp, p)
478 { base_type::copy_from_range(first, last); }
490 template<
typename It>
492 const comb_probe_fn& cp,
const probe_fn& p,
493 const resize_policy& rp)
494 : base_type(h, e, cp, p, rp)
495 { base_type::copy_from_range(first, last); }
498 : base_type((
const base_type&)other)
517 { base_type::swap(other); }
520 #undef PB_DS_GP_HASH_BASE 528 #define PB_DS_BRANCH_BASE \ 529 detail::container_base_dispatch<Key, Mapped, _Alloc, Tag, Policy_Tl>::type 553 template<
typename Key,
typename Mapped,
typename Tag,
554 typename Node_Update,
typename Policy_Tl,
typename _Alloc>
558 typedef typename PB_DS_BRANCH_BASE base_type;
561 typedef Node_Update node_update;
570 : base_type((
const base_type&)other) { }
572 template<
typename T0>
575 template<
typename T0,
typename T1>
578 template<
typename T0,
typename T1,
typename T2>
579 basic_branch(T0 t0, T1 t1, T2 t2) : base_type(t0, t1, t2) { }
581 template<
typename T0,
typename T1,
typename T2,
typename T3>
583 : base_type(t0, t1, t2, t3) { }
585 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4>
587 : base_type(t0, t1, t2, t3, t4) { }
589 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4,
592 : base_type(t0, t1, t2, t3, t4, t5) { }
594 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4,
595 typename T5,
typename T6>
596 basic_branch(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6)
597 : base_type(t0, t1, t2, t3, t4, t5, t6) { }
599 #undef PB_DS_BRANCH_BASE 602 #define PB_DS_TREE_NODE_AND_IT_TRAITS \ 603 detail::tree_traits<Key, Mapped,Cmp_Fn,Node_Update,Tag,_Alloc> 605 #define PB_DS_TREE_BASE \ 606 basic_branch<Key,Mapped, Tag, \ 607 typename PB_DS_TREE_NODE_AND_IT_TRAITS::node_update, \ 608 typename __gnu_cxx::typelist::create2<Cmp_Fn, \ 609 PB_DS_TREE_NODE_AND_IT_TRAITS>::type, _Alloc> 629 template<
typename Key,
typename Mapped,
typename Cmp_Fn = std::less<Key>,
630 typename Tag = rb_tree_tag,
631 template<
typename Node_CItr,
typename Node_Itr,
632 typename Cmp_Fn_,
typename _Alloc_>
635 class tree :
public PB_DS_TREE_BASE
654 template<
typename It>
656 { base_type::copy_from_range(first, last); }
662 template<
typename It>
663 tree(It first, It last,
const cmp_fn& c)
665 { base_type::copy_from_range(first, last); }
668 : base_type((
const base_type&)other) { }
674 operator=(
const tree& other)
686 { base_type::swap(other); }
689 #undef PB_DS_TREE_BASE 690 #undef PB_DS_TREE_NODE_AND_IT_TRAITS 693 #define PB_DS_TRIE_NODE_AND_IT_TRAITS \ 694 detail::trie_traits<Key,Mapped,_ATraits,Node_Update,Tag,_Alloc> 696 #define PB_DS_TRIE_BASE \ 697 basic_branch<Key,Mapped,Tag, \ 698 typename PB_DS_TRIE_NODE_AND_IT_TRAITS::node_update, \ 699 typename __gnu_cxx::typelist::create2<_ATraits, \ 700 PB_DS_TRIE_NODE_AND_IT_TRAITS >::type, _Alloc> 720 template<
typename Key,
722 typename _ATraits = \
725 template<
typename Node_CItr,
731 class trie :
public PB_DS_TRIE_BASE
750 template<
typename It>
752 { base_type::copy_from_range(first, last); }
757 template<
typename It>
758 trie(It first, It last,
const access_traits& t)
760 { base_type::copy_from_range(first, last); }
763 : base_type((
const base_type&)other) { }
769 operator=(
const trie& other)
781 { base_type::swap(other); }
784 #undef PB_DS_TRIE_BASE 785 #undef PB_DS_TRIE_NODE_AND_IT_TRAITS 793 #define PB_DS_LU_BASE \ 794 detail::container_base_dispatch<Key, Mapped, _Alloc, list_update_tag, \ 795 typename __gnu_cxx::typelist::create2<Eq_Fn, Update_Policy>::type>::type 810 template<
typename Key,
818 typedef typename PB_DS_LU_BASE base_type;
823 typedef Update_Policy update_policy;
830 template<
typename It>
832 { base_type::copy_from_range(first, last); }
835 : base_type((
const base_type&)other) { }
853 { base_type::swap(other); }
cc_hash_table(const hash_fn &h, const eq_fn &e)
Constructor taking some policy objects. r_hash_fn will be copied by the hash_fn object of the contain...
GNU extensions for policy-based data structures for public use.
gp_hash_table(const hash_fn &h, const eq_fn &e)
Constructor taking some policy objects. r_hash_fn will be copied by the hash_fn object of the contain...
cc_hash_table(It first, It last, const hash_fn &h, const eq_fn &e, const comb_hash_fn &ch)
Constructor taking __iterators to a range of value_types and some policy objects The value_types betw...
cc_hash_table(It first, It last, const hash_fn &h, const eq_fn &e)
Constructor taking __iterators to a range of value_types and some policy objects The value_types betw...
cond_type::__type type
Dispatched type.
cc_hash_table(It first, It last, const hash_fn &h)
Constructor taking __iterators to a range of value_types and some policy objects. The value_types bet...
Primary template, default_trie_access_traits.
tree(It first, It last, const cmp_fn &c)
Constructor taking __iterators to a range of value_types and some policy objects The value_types betw...
trie(It first, It last, const access_traits &t)
Constructor taking __iterators to a range of value_types and some policy objects. The value_types bet...
gp_hash_table(It first, It last)
Constructor taking __iterators to a range of value_types. The value_types between first_it and last_i...
cc_hash_table(It first, It last, const hash_fn &h, const eq_fn &e, const comb_hash_fn &ch, const resize_policy &rp)
Constructor taking __iterators to a range of value_types and some policy objects The value_types betw...
list_update(It first, It last)
Constructor taking __iterators to a range of value_types. The value_types between first_it and last_i...
The standard allocator, as per [20.4].
trie(It first, It last)
Constructor taking __iterators to a range of value_types. The value_types between first_it and last_i...
gp_hash_table(const hash_fn &h, const eq_fn &e, const comb_probe_fn &cp, const probe_fn &p)
Constructor taking some policy objects. r_hash_fn will be copied by the hash_fn object of the contain...
gp_hash_table(It first, It last, const hash_fn &h)
Constructor taking __iterators to a range of value_types and some policy objects. The value_types bet...
gp_hash_table(It first, It last, const hash_fn &h, const eq_fn &e, const comb_probe_fn &cp, const probe_fn &p)
Constructor taking __iterators to a range of value_types and some policy objects. The value_types bet...
gp_hash_table(const hash_fn &h, const eq_fn &e, const comb_probe_fn &cp)
Constructor taking some policy objects. r_hash_fn will be copied by the hash_fn object of the contain...
A resize policy which delegates operations to size and trigger policies.
lu_move_to_front_policy type
Dispatched type.
cc_hash_table(const hash_fn &h)
Constructor taking some policy objects. r_hash_fn will be copied by the Hash_Fn object of the contain...
direct_mask_range_hashing type
Dispatched type.
cc_hash_table(const hash_fn &h, const eq_fn &e, const comb_hash_fn &ch, const resize_policy &rp)
Constructor taking some policy objects. r_hash_fn will be copied by the hash_fn object of the contain...
cc_hash_table(const hash_fn &h, const eq_fn &e, const comb_hash_fn &ch)
Constructor taking some policy objects. r_hash_fn will be copied by the hash_fn object of the contain...
One of the comparison functors.
gp_hash_table(It first, It last, const hash_fn &h, const eq_fn &e)
Constructor taking __iterators to a range of value_types and some policy objects. The value_types bet...
gp_hash_table(It first, It last, const hash_fn &h, const eq_fn &e, const comb_probe_fn &cp)
Constructor taking __iterators to a range of value_types and some policy objects. The value_types bet...
std::tr1::hash< Key > type
Dispatched type.
gp_hash_table(const hash_fn &h)
Constructor taking some policy objects. r_hash_fn will be copied by the hash_fn object of the contain...
gp_hash_table(const hash_fn &h, const eq_fn &e, const comb_probe_fn &cp, const probe_fn &p, const resize_policy &rp)
Constructor taking some policy objects. r_hash_fn will be copied by the hash_fn object of the contain...
_ATraits access_traits
Element access traits type.
trie(const access_traits &t)
Constructor taking some policy objects. r_access_traits will be copied by the _ATraits object of the ...
tree(It first, It last)
Constructor taking __iterators to a range of value_types. The value_types between first_it and last_i...
tree(const cmp_fn &c)
Constructor taking some policy objects. r_cmp_fn will be copied by the Cmp_Fn object of the container...
cc_hash_table(It first, It last)
Constructor taking __iterators to a range of value_types. The value_types between first_it and last_i...
cc_hash_table()
Default constructor.
gp_hash_table(It first, It last, const hash_fn &h, const eq_fn &e, const comb_probe_fn &cp, const probe_fn &p, const resize_policy &rp)
Constructor taking __iterators to a range of value_types and some policy objects. The value_types bet...
Cmp_Fn cmp_fn
Comparison functor type.
gp_hash_table()
Default constructor.
A null node updator, indicating that no node updates are required.