libstdc++
cc_ht_map_.hpp
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // Copyright (C) 2005-2015 Free Software Foundation, Inc.
00004 //
00005 // This file is part of the GNU ISO C++ Library.  This library is free
00006 // software; you can redistribute it and/or modify it under the terms
00007 // of the GNU General Public License as published by the Free Software
00008 // Foundation; either version 3, or (at your option) any later
00009 // version.
00010 
00011 // This library is distributed in the hope that it will be useful, but
00012 // WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // General Public License for more details.
00015 
00016 // Under Section 7 of GPL version 3, you are granted additional
00017 // permissions described in the GCC Runtime Library Exception, version
00018 // 3.1, as published by the Free Software Foundation.
00019 
00020 // You should have received a copy of the GNU General Public License and
00021 // a copy of the GCC Runtime Library Exception along with this program;
00022 // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
00023 // <http://www.gnu.org/licenses/>.
00024 
00025 // Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
00026 
00027 // Permission to use, copy, modify, sell, and distribute this software
00028 // is hereby granted without fee, provided that the above copyright
00029 // notice appears in all copies, and that both that copyright notice
00030 // and this permission notice appear in supporting documentation. None
00031 // of the above authors, nor IBM Haifa Research Laboratories, make any
00032 // representation about the suitability of this software for any
00033 // purpose. It is provided "as is" without express or implied
00034 // warranty.
00035 
00036 /**
00037  * @file cc_hash_table_map_/cc_ht_map_.hpp
00038  * Contains an implementation class for cc_ht_map_.
00039  */
00040 
00041 #include <utility>
00042 #include <iterator>
00043 #include <ext/pb_ds/detail/cond_dealtor.hpp>
00044 #include <ext/pb_ds/tag_and_trait.hpp>
00045 #include <ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp>
00046 #include <ext/pb_ds/detail/types_traits.hpp>
00047 #include <ext/pb_ds/exception.hpp>
00048 #include <ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp>
00049 #ifdef _GLIBCXX_DEBUG
00050 #include <ext/pb_ds/detail/debug_map_base.hpp>
00051 #endif
00052 #ifdef PB_DS_HT_MAP_TRACE_
00053 #include <iostream>
00054 #endif
00055 #include <debug/debug.h>
00056 
00057 namespace __gnu_pbds
00058 {
00059   namespace detail
00060   {
00061 #ifdef PB_DS_DATA_TRUE_INDICATOR
00062 #define PB_DS_CC_HASH_NAME cc_ht_map
00063 #endif
00064 
00065 #ifdef PB_DS_DATA_FALSE_INDICATOR
00066 #define PB_DS_CC_HASH_NAME cc_ht_set
00067 #endif
00068 
00069 #define PB_DS_CLASS_T_DEC \
00070     template<typename Key, typename Mapped, typename Hash_Fn, \
00071              typename Eq_Fn, typename _Alloc, bool Store_Hash, \
00072              typename Comb_Hash_Fn, typename Resize_Policy>
00073 
00074 #define PB_DS_CLASS_C_DEC \
00075     PB_DS_CC_HASH_NAME<Key, Mapped, Hash_Fn, Eq_Fn, _Alloc,     \
00076                      Store_Hash, Comb_Hash_Fn, Resize_Policy>
00077 
00078 #define PB_DS_HASH_EQ_FN_C_DEC \
00079     hash_eq_fn<Key, Eq_Fn, _Alloc, Store_Hash>
00080 
00081 #define PB_DS_RANGED_HASH_FN_C_DEC \
00082     ranged_hash_fn<Key, Hash_Fn, _Alloc, Comb_Hash_Fn, Store_Hash>
00083 
00084 #define PB_DS_CC_HASH_TRAITS_BASE \
00085     types_traits<Key, Mapped, _Alloc, Store_Hash>
00086 
00087 #ifdef _GLIBCXX_DEBUG
00088 #define PB_DS_DEBUG_MAP_BASE_C_DEC \
00089     debug_map_base<Key, Eq_Fn, \
00090                   typename _Alloc::template rebind<Key>::other::const_reference>
00091 #endif
00092 
00093 
00094     /**
00095      *  A collision-chaining hash-based container.
00096      *
00097      *
00098      *  @ingroup hash-detail
00099      *
00100      *  @tparam Key             Key type.
00101      *
00102      *  @tparam Mapped          Map type.
00103      *
00104      *  @tparam Hash_Fn         Hashing functor.
00105      *                          Default is __gnu_cxx::hash.
00106      *
00107      *  @tparam Eq_Fn           Equal functor.
00108      *                          Default std::equal_to<Key>
00109      *
00110      *  @tparam _Alloc          Allocator type.
00111      *
00112      *  @tparam Store_Hash      If key type stores extra metadata.
00113      *                          Defaults to false.
00114      *
00115      *  @tparam Comb_Hash_Fn    Combining hash functor.
00116      *                          If Hash_Fn is not null_type, then this
00117      *                          is the ranged-hash functor; otherwise,
00118      *                          this is the range-hashing functor.
00119      *                    XXX(See Design::Hash-Based Containers::Hash Policies.)
00120      *                          Default direct_mask_range_hashing.
00121      *
00122      *  @tparam Resize_Policy   Resizes hash.
00123      *                          Defaults to hash_standard_resize_policy,
00124      *                          using hash_exponential_size_policy and
00125      *                          hash_load_check_resize_trigger.
00126      *
00127      *
00128      *  Bases are: detail::hash_eq_fn, Resize_Policy, detail::ranged_hash_fn,
00129      *             detail::types_traits. (Optional: detail::debug_map_base.)
00130      */
00131     template<typename Key,
00132              typename Mapped,
00133              typename Hash_Fn,
00134              typename Eq_Fn,
00135              typename _Alloc,
00136              bool Store_Hash,
00137              typename Comb_Hash_Fn,
00138              typename Resize_Policy >
00139     class PB_DS_CC_HASH_NAME:
00140 #ifdef _GLIBCXX_DEBUG
00141       protected PB_DS_DEBUG_MAP_BASE_C_DEC,
00142 #endif
00143       public PB_DS_HASH_EQ_FN_C_DEC,
00144       public Resize_Policy,
00145       public PB_DS_RANGED_HASH_FN_C_DEC,
00146       public PB_DS_CC_HASH_TRAITS_BASE
00147     {
00148     private:
00149       typedef PB_DS_CC_HASH_TRAITS_BASE         traits_base;
00150       typedef typename traits_base::comp_hash   comp_hash;
00151       typedef typename traits_base::value_type  value_type_;
00152       typedef typename traits_base::pointer     pointer_;
00153       typedef typename traits_base::const_pointer const_pointer_;
00154       typedef typename traits_base::reference   reference_;
00155       typedef typename traits_base::const_reference const_reference_;
00156 
00157       struct entry : public traits_base::stored_data_type
00158       {
00159         typename _Alloc::template rebind<entry>::other::pointer m_p_next;
00160       };
00161 
00162       typedef cond_dealtor<entry, _Alloc>       cond_dealtor_t;
00163 
00164       typedef typename _Alloc::template rebind<entry>::other entry_allocator;
00165       typedef typename entry_allocator::pointer entry_pointer;
00166       typedef typename entry_allocator::const_pointer const_entry_pointer;
00167       typedef typename entry_allocator::reference entry_reference;
00168       typedef typename entry_allocator::const_reference const_entry_reference;
00169 
00170       typedef typename _Alloc::template rebind<entry_pointer>::other entry_pointer_allocator;
00171       typedef typename entry_pointer_allocator::pointer entry_pointer_array;
00172 
00173       typedef PB_DS_RANGED_HASH_FN_C_DEC ranged_hash_fn_base;
00174       typedef PB_DS_HASH_EQ_FN_C_DEC hash_eq_fn_base;
00175       typedef Resize_Policy resize_base;
00176 
00177 #ifdef _GLIBCXX_DEBUG
00178       typedef PB_DS_DEBUG_MAP_BASE_C_DEC        debug_base;
00179 #endif
00180 
00181 #define PB_DS_GEN_POS std::pair<entry_pointer, typename _Alloc::size_type>
00182 
00183 #include <ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp>
00184 #include <ext/pb_ds/detail/unordered_iterator/point_iterator.hpp>
00185 #include <ext/pb_ds/detail/unordered_iterator/const_iterator.hpp>
00186 #include <ext/pb_ds/detail/unordered_iterator/iterator.hpp>
00187 
00188 #undef PB_DS_GEN_POS
00189 
00190     public:
00191       typedef _Alloc                            allocator_type;
00192       typedef typename _Alloc::size_type        size_type;
00193       typedef typename _Alloc::difference_type  difference_type;
00194       typedef Hash_Fn                           hash_fn;
00195       typedef Eq_Fn                             eq_fn;
00196       typedef Comb_Hash_Fn                      comb_hash_fn;
00197       typedef Resize_Policy                     resize_policy;
00198 
00199       /// Value stores hash, true or false.
00200       enum
00201         {
00202           store_hash = Store_Hash
00203         };
00204 
00205       typedef typename traits_base::key_type key_type;
00206       typedef typename traits_base::key_pointer key_pointer;
00207       typedef typename traits_base::key_const_pointer key_const_pointer;
00208       typedef typename traits_base::key_reference key_reference;
00209       typedef typename traits_base::key_const_reference key_const_reference;
00210       typedef typename traits_base::mapped_type mapped_type;
00211       typedef typename traits_base::mapped_pointer mapped_pointer;
00212       typedef typename traits_base::mapped_const_pointer mapped_const_pointer;
00213       typedef typename traits_base::mapped_reference mapped_reference;
00214       typedef typename traits_base::mapped_const_reference mapped_const_reference;
00215       typedef typename traits_base::value_type  value_type;
00216       typedef typename traits_base::pointer     pointer;
00217       typedef typename traits_base::const_pointer const_pointer;
00218       typedef typename traits_base::reference   reference;
00219       typedef typename traits_base::const_reference const_reference;
00220 
00221 #ifdef PB_DS_DATA_TRUE_INDICATOR
00222       typedef point_iterator_                   point_iterator;
00223 #endif
00224 
00225 #ifdef PB_DS_DATA_FALSE_INDICATOR
00226       typedef point_const_iterator_             point_iterator;
00227 #endif
00228 
00229       typedef point_const_iterator_             point_const_iterator;
00230 
00231 #ifdef PB_DS_DATA_TRUE_INDICATOR
00232       typedef iterator_                         iterator;
00233 #endif
00234 
00235 #ifdef PB_DS_DATA_FALSE_INDICATOR
00236       typedef const_iterator_                   iterator;
00237 #endif
00238 
00239       typedef const_iterator_                   const_iterator;
00240 
00241       PB_DS_CC_HASH_NAME();
00242 
00243       PB_DS_CC_HASH_NAME(const Hash_Fn&);
00244 
00245       PB_DS_CC_HASH_NAME(const Hash_Fn&, const Eq_Fn&);
00246 
00247       PB_DS_CC_HASH_NAME(const Hash_Fn&, const Eq_Fn&, const Comb_Hash_Fn&);
00248 
00249       PB_DS_CC_HASH_NAME(const Hash_Fn&, const Eq_Fn&, const Comb_Hash_Fn&,
00250                        const Resize_Policy&);
00251 
00252       PB_DS_CC_HASH_NAME(const PB_DS_CLASS_C_DEC&);
00253 
00254       virtual
00255       ~PB_DS_CC_HASH_NAME();
00256 
00257       void
00258       swap(PB_DS_CLASS_C_DEC&);
00259 
00260       template<typename It>
00261       void
00262       copy_from_range(It, It);
00263 
00264       void
00265       initialize();
00266 
00267       inline size_type
00268       size() const;
00269 
00270       inline size_type
00271       max_size() const;
00272 
00273       /// True if size() == 0.
00274       inline bool
00275       empty() const;
00276 
00277       /// Return current hash_fn.
00278       Hash_Fn&
00279       get_hash_fn();
00280 
00281       /// Return current const hash_fn.
00282       const Hash_Fn&
00283       get_hash_fn() const;
00284 
00285       /// Return current eq_fn.
00286       Eq_Fn&
00287       get_eq_fn();
00288 
00289       /// Return current const eq_fn.
00290       const Eq_Fn&
00291       get_eq_fn() const;
00292 
00293       /// Return current comb_hash_fn.
00294       Comb_Hash_Fn&
00295       get_comb_hash_fn();
00296 
00297       /// Return current const comb_hash_fn.
00298       const Comb_Hash_Fn&
00299       get_comb_hash_fn() const;
00300 
00301       /// Return current resize_policy.
00302       Resize_Policy&
00303       get_resize_policy();
00304 
00305       /// Return current const resize_policy.
00306       const Resize_Policy&
00307       get_resize_policy() const;
00308 
00309       inline std::pair<point_iterator, bool>
00310       insert(const_reference r_val)
00311       { return insert_imp(r_val, traits_base::m_store_extra_indicator); }
00312 
00313       inline mapped_reference
00314       operator[](key_const_reference r_key)
00315       {
00316 #ifdef PB_DS_DATA_TRUE_INDICATOR
00317         return (subscript_imp(r_key, traits_base::m_store_extra_indicator));
00318 #else
00319         insert(r_key);
00320         return traits_base::s_null_type;
00321 #endif
00322       }
00323 
00324       inline point_iterator
00325       find(key_const_reference);
00326 
00327       inline point_const_iterator
00328       find(key_const_reference) const;
00329 
00330       inline point_iterator
00331       find_end();
00332 
00333       inline point_const_iterator
00334       find_end() const;
00335 
00336       inline bool
00337       erase(key_const_reference);
00338 
00339       template<typename Pred>
00340       inline size_type
00341       erase_if(Pred);
00342 
00343       void
00344       clear();
00345 
00346       inline iterator
00347       begin();
00348 
00349       inline const_iterator
00350       begin() const;
00351 
00352       inline iterator
00353       end();
00354 
00355       inline const_iterator
00356       end() const;
00357 
00358 #ifdef _GLIBCXX_DEBUG
00359       void
00360       assert_valid(const char*, int) const;
00361 #endif
00362 
00363 #ifdef PB_DS_HT_MAP_TRACE_
00364       void
00365       trace() const;
00366 #endif
00367 
00368     private:
00369       void
00370       deallocate_all();
00371 
00372       inline bool
00373       do_resize_if_needed();
00374 
00375       inline void
00376       do_resize_if_needed_no_throw();
00377 
00378       void
00379       resize_imp(size_type);
00380 
00381       void
00382       do_resize(size_type);
00383 
00384       void
00385       resize_imp_no_exceptions(size_type, entry_pointer_array, size_type);
00386 
00387       inline entry_pointer
00388       resize_imp_no_exceptions_reassign_pointer(entry_pointer,
00389                                                 entry_pointer_array,
00390                                                 false_type);
00391 
00392       inline entry_pointer
00393       resize_imp_no_exceptions_reassign_pointer(entry_pointer,
00394                                                 entry_pointer_array,
00395                                                 true_type);
00396 
00397       void
00398       deallocate_links_in_list(entry_pointer);
00399 
00400       inline entry_pointer
00401       get_entry(const_reference, false_type);
00402 
00403       inline entry_pointer
00404       get_entry(const_reference, true_type);
00405 
00406       inline void
00407       rels_entry(entry_pointer);
00408 
00409 #ifdef PB_DS_DATA_TRUE_INDICATOR
00410       inline mapped_reference
00411       subscript_imp(key_const_reference r_key, false_type)
00412       {
00413         _GLIBCXX_DEBUG_ONLY(assert_valid(__FILE__, __LINE__);)
00414         const size_type pos = ranged_hash_fn_base::operator()(r_key);
00415         entry_pointer p_e = m_entries[pos];
00416         resize_base::notify_insert_search_start();
00417 
00418         while (p_e != 0
00419                && !hash_eq_fn_base::operator()(p_e->m_value.first, r_key))
00420           {
00421             resize_base::notify_insert_search_collision();
00422             p_e = p_e->m_p_next;
00423           }
00424 
00425         resize_base::notify_insert_search_end();
00426         if (p_e != 0)
00427           {
00428             PB_DS_CHECK_KEY_EXISTS(r_key)
00429             return (p_e->m_value.second);
00430           }
00431 
00432         PB_DS_CHECK_KEY_DOES_NOT_EXIST(r_key)
00433         return insert_new_imp(value_type(r_key, mapped_type()), pos)->second;
00434       }
00435 
00436       inline mapped_reference
00437       subscript_imp(key_const_reference r_key, true_type)
00438       {
00439         _GLIBCXX_DEBUG_ONLY(assert_valid(__FILE__, __LINE__);)
00440         comp_hash pos_hash_pair = ranged_hash_fn_base::operator()(r_key);
00441         entry_pointer p_e = m_entries[pos_hash_pair.first];
00442         resize_base::notify_insert_search_start();
00443         while (p_e != 0 &&
00444                !hash_eq_fn_base::operator()(p_e->m_value.first, p_e->m_hash,
00445                                             r_key, pos_hash_pair.second))
00446           {
00447             resize_base::notify_insert_search_collision();
00448             p_e = p_e->m_p_next;
00449           }
00450 
00451         resize_base::notify_insert_search_end();
00452         if (p_e != 0)
00453           {
00454             PB_DS_CHECK_KEY_EXISTS(r_key)
00455             return p_e->m_value.second;
00456           }
00457 
00458         PB_DS_CHECK_KEY_DOES_NOT_EXIST(r_key)
00459         return insert_new_imp(value_type(r_key, mapped_type()),
00460                               pos_hash_pair)->second;
00461       }
00462 #endif
00463 
00464       inline std::pair<point_iterator, bool>
00465       insert_imp(const_reference, false_type);
00466 
00467       inline std::pair<point_iterator, bool>
00468       insert_imp(const_reference, true_type);
00469 
00470       inline pointer
00471       insert_new_imp(const_reference r_val, size_type pos)
00472       {
00473         if (do_resize_if_needed())
00474           pos = ranged_hash_fn_base::operator()(PB_DS_V2F(r_val));
00475 
00476         // Following lines might throw an exception.
00477         entry_pointer p_e = get_entry(r_val,
00478                                       traits_base::m_no_throw_copies_indicator);
00479 
00480         // At this point no exceptions can be thrown.
00481         p_e->m_p_next = m_entries[pos];
00482         m_entries[pos] = p_e;
00483         resize_base::notify_inserted(++m_num_used_e);
00484 
00485         _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
00486         _GLIBCXX_DEBUG_ONLY(assert_valid(__FILE__, __LINE__);)
00487         return &p_e->m_value;
00488       }
00489 
00490       inline pointer
00491       insert_new_imp(const_reference r_val, comp_hash& r_pos_hash_pair)
00492       {
00493         // Following lines might throw an exception.
00494         if (do_resize_if_needed())
00495           r_pos_hash_pair = ranged_hash_fn_base::operator()(PB_DS_V2F(r_val));
00496 
00497         entry_pointer p_e = get_entry(r_val,
00498                                       traits_base::m_no_throw_copies_indicator);
00499 
00500         // At this point no exceptions can be thrown.
00501         p_e->m_hash = r_pos_hash_pair.second;
00502         p_e->m_p_next = m_entries[r_pos_hash_pair.first];
00503         m_entries[r_pos_hash_pair.first] = p_e;
00504         resize_base::notify_inserted(++m_num_used_e);
00505         _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
00506         _GLIBCXX_DEBUG_ONLY(assert_valid(__FILE__, __LINE__);)
00507         return &p_e->m_value;
00508       }
00509 
00510       inline pointer
00511       find_key_pointer(key_const_reference r_key, false_type)
00512       {
00513         entry_pointer p_e = m_entries[ranged_hash_fn_base::operator()(r_key)];
00514         resize_base::notify_find_search_start();
00515         while (p_e != 0 &&
00516                !hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value), r_key))
00517           {
00518             resize_base::notify_find_search_collision();
00519             p_e = p_e->m_p_next;
00520           }
00521 
00522         resize_base::notify_find_search_end();
00523 
00524 #ifdef _GLIBCXX_DEBUG
00525         if (p_e == 0)
00526           PB_DS_CHECK_KEY_DOES_NOT_EXIST(r_key)
00527         else
00528           PB_DS_CHECK_KEY_EXISTS(r_key)
00529 #endif
00530         return &p_e->m_value;
00531       }
00532 
00533       inline pointer
00534       find_key_pointer(key_const_reference r_key, true_type)
00535       {
00536         comp_hash pos_hash_pair = ranged_hash_fn_base::operator()(r_key);
00537         entry_pointer p_e = m_entries[pos_hash_pair.first];
00538         resize_base::notify_find_search_start();
00539         while (p_e != 0 &&
00540                !hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value),
00541                                             p_e->m_hash,
00542                                             r_key, pos_hash_pair.second))
00543           {
00544             resize_base::notify_find_search_collision();
00545             p_e = p_e->m_p_next;
00546           }
00547 
00548         resize_base::notify_find_search_end();
00549 
00550 #ifdef _GLIBCXX_DEBUG
00551         if (p_e == 0)
00552           PB_DS_CHECK_KEY_DOES_NOT_EXIST(r_key)
00553         else
00554           PB_DS_CHECK_KEY_EXISTS(r_key)
00555 #endif
00556         return &p_e->m_value;
00557       }
00558 
00559       inline bool
00560       erase_in_pos_imp(key_const_reference, size_type);
00561 
00562       inline bool
00563       erase_in_pos_imp(key_const_reference, const comp_hash&);
00564 
00565       inline void
00566       erase_entry_pointer(entry_pointer&);
00567 
00568 #ifdef PB_DS_DATA_TRUE_INDICATOR
00569       void
00570       inc_it_state(pointer& r_p_value,
00571                    std::pair<entry_pointer, size_type>& r_pos) const
00572       {
00573         inc_it_state((mapped_const_pointer& )r_p_value, r_pos);
00574       }
00575 #endif
00576 
00577       void
00578       inc_it_state(const_pointer& r_p_value,
00579                    std::pair<entry_pointer, size_type>& r_pos) const
00580       {
00581         _GLIBCXX_DEBUG_ASSERT(r_p_value != 0);
00582         r_pos.first = r_pos.first->m_p_next;
00583         if (r_pos.first != 0)
00584           {
00585             r_p_value = &r_pos.first->m_value;
00586             return;
00587           }
00588 
00589         for (++r_pos.second; r_pos.second < m_num_e; ++r_pos.second)
00590           if (m_entries[r_pos.second] != 0)
00591             {
00592               r_pos.first = m_entries[r_pos.second];
00593               r_p_value = &r_pos.first->m_value;
00594               return;
00595             }
00596         r_p_value = 0;
00597       }
00598 
00599       void
00600       get_start_it_state(pointer& r_p_value,
00601                          std::pair<entry_pointer, size_type>& r_pos) const
00602       {
00603         for (r_pos.second = 0; r_pos.second < m_num_e; ++r_pos.second)
00604           if (m_entries[r_pos.second] != 0)
00605             {
00606               r_pos.first = m_entries[r_pos.second];
00607               r_p_value = &r_pos.first->m_value;
00608               return;
00609             }
00610         r_p_value = 0;
00611       }
00612 
00613 #ifdef _GLIBCXX_DEBUG
00614       void
00615       assert_entry_pointer_array_valid(const entry_pointer_array,
00616                                        const char*, int) const;
00617 
00618       void
00619       assert_entry_pointer_valid(const entry_pointer, true_type,
00620                                  const char*, int) const;
00621 
00622       void
00623       assert_entry_pointer_valid(const entry_pointer, false_type,
00624                                  const char*, int) const;
00625 #endif
00626 
00627 #ifdef PB_DS_HT_MAP_TRACE_
00628       void
00629       trace_list(const_entry_pointer) const;
00630 #endif
00631 
00632     private:
00633 #ifdef PB_DS_DATA_TRUE_INDICATOR
00634       friend class iterator_;
00635 #endif
00636 
00637       friend class const_iterator_;
00638 
00639       static entry_allocator            s_entry_allocator;
00640       static entry_pointer_allocator    s_entry_pointer_allocator;
00641       static iterator                   s_end_it;
00642       static const_iterator             s_const_end_it;
00643       static point_iterator             s_find_end_it;
00644       static point_const_iterator       s_const_find_end_it;
00645 
00646       size_type                         m_num_e;
00647       size_type                         m_num_used_e;
00648       entry_pointer_array               m_entries;
00649 
00650       enum
00651         {
00652           store_hash_ok = !Store_Hash
00653                           || !is_same<Hash_Fn, __gnu_pbds::null_type>::value
00654         };
00655 
00656       PB_DS_STATIC_ASSERT(sth, store_hash_ok);
00657     };
00658 
00659 #include <ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp>
00660 #include <ext/pb_ds/detail/cc_hash_table_map_/entry_list_fn_imps.hpp>
00661 #include <ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp>
00662 #include <ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp>
00663 #include <ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp>
00664 #include <ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp>
00665 #include <ext/pb_ds/detail/cc_hash_table_map_/policy_access_fn_imps.hpp>
00666 #include <ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp>
00667 #include <ext/pb_ds/detail/cc_hash_table_map_/iterators_fn_imps.hpp>
00668 #include <ext/pb_ds/detail/cc_hash_table_map_/insert_fn_imps.hpp>
00669 #include <ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp>
00670 
00671 #undef PB_DS_CLASS_T_DEC
00672 #undef PB_DS_CLASS_C_DEC
00673 #undef PB_DS_HASH_EQ_FN_C_DEC
00674 #undef PB_DS_RANGED_HASH_FN_C_DEC
00675 #undef PB_DS_CC_HASH_TRAITS_BASE
00676 #undef PB_DS_DEBUG_MAP_BASE_C_DEC
00677 #undef PB_DS_CC_HASH_NAME
00678   } // namespace detail
00679 } // namespace __gnu_pbds