]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libstdc++/29367 (pb_ds hash containers vs. _GLIBCXX_DEBUG)
authorBenjamin Kosnik <bkoz@gcc.gnu.org>
Fri, 7 Sep 2007 02:20:58 +0000 (02:20 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Fri, 7 Sep 2007 02:20:58 +0000 (02:20 +0000)
2007-09-06  Benjamin Kosnik  <bkoz@redhat.com>

PR libstdc++/29367
* include/ext/pb_ds/detail/map_debug_base.hpp: From this..
* include/ext/pb_ds/detail/debug_map_base.hpp: ...to this.
Rename map_debug_base to debug_map_base, add std::pair output
extractors, change duplicate map_debug_base typedef in containers
to debug_base. Use m_store_extra_indicator for m_store_hash_indicator.
* include/ext/pb_ds/*: Likewise.
* include/Makefile.am: Same.
* include/Makefile.in: Regenerate.

From-SVN: r128221

58 files changed:
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp
libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/r_erase_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/split_join_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp
libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cmp_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/erase_store_hash_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp [moved from libstdc++-v3/include/ext/pb_ds/detail/map_debug_base.hpp with 89% similarity]
libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/erase_store_hash_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp
libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp
libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp
libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp
libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/r_erase_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp
libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp
libstdc++-v3/include/ext/pb_ds/detail/types_traits.hpp
libstdc++-v3/include/ext/pb_ds/tag_and_trait.hpp

index c51128bd9af4fae892e6386fcebc957c90fdbf05..367e3af9badd2a276c18c2040543bf6bf57caaa4 100644 (file)
@@ -372,7 +372,7 @@ pb_headers4 = \
        ${pb_srcdir}/detail/list_update_policy/counter_lu_policy_imp.hpp \
        ${pb_srcdir}/detail/list_update_policy/mtf_lu_policy_imp.hpp \
        ${pb_srcdir}/detail/list_update_policy/sample_update_policy.hpp \
-       ${pb_srcdir}/detail/map_debug_base.hpp \
+       ${pb_srcdir}/detail/debug_map_base.hpp \
        ${pb_srcdir}/detail/ov_tree_map_/cond_dtor.hpp \
        ${pb_srcdir}/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp \
        ${pb_srcdir}/detail/ov_tree_map_/debug_fn_imps.hpp \
index f6e69b0e85b017c7de6363412199a96e5693e4a9..5a0aa1c305cb7256d0b7d113f00634363f51f21d 100644 (file)
@@ -616,7 +616,7 @@ pb_headers4 = \
        ${pb_srcdir}/detail/list_update_policy/counter_lu_policy_imp.hpp \
        ${pb_srcdir}/detail/list_update_policy/mtf_lu_policy_imp.hpp \
        ${pb_srcdir}/detail/list_update_policy/sample_update_policy.hpp \
-       ${pb_srcdir}/detail/map_debug_base.hpp \
+       ${pb_srcdir}/detail/debug_map_base.hpp \
        ${pb_srcdir}/detail/ov_tree_map_/cond_dtor.hpp \
        ${pb_srcdir}/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp \
        ${pb_srcdir}/detail/ov_tree_map_/debug_fn_imps.hpp \
index fa0ff416b42a007f52757c8f8a904deb8391c08c..2bf69ba0068c446b351d75b73507d61c39246e93 100644 (file)
@@ -51,7 +51,7 @@
 #include <ext/pb_ds/exception.hpp>
 #include <ext/pb_ds/detail/eq_fn/eq_by_less.hpp>
 #include <ext/pb_ds/detail/types_traits.hpp>
-#include <ext/pb_ds/detail/map_debug_base.hpp>
+#include <ext/pb_ds/detail/debug_map_base.hpp>
 #include <ext/pb_ds/tree_policy.hpp>
 #include <ext/pb_ds/detail/cond_dealtor.hpp>
 #include <ext/pb_ds/detail/type_utils.hpp>
@@ -95,8 +95,8 @@ namespace pb_ds
                                                false>
 
 #ifdef _GLIBCXX_DEBUG
-#define PB_DS_MAP_DEBUG_BASE_C_DEC                                     \
-    map_debug_base<Key,        eq_by_less<Key, Cmp_Fn>, \
+#define PB_DS_DEBUG_MAP_BASE_C_DEC                                     \
+    debug_map_base<Key,        eq_by_less<Key, Cmp_Fn>, \
              typename Allocator::template rebind<Key>::other::const_reference>
 #endif 
 
@@ -132,7 +132,7 @@ namespace pb_ds
             class Allocator>
     class PB_DS_CLASS_NAME :
 #ifdef _GLIBCXX_DEBUG
-      public PB_DS_MAP_DEBUG_BASE_C_DEC,
+      public PB_DS_DEBUG_MAP_BASE_C_DEC,
 #endif 
 #ifdef PB_DS_TREE_TRACE
       public PB_DS_TREE_TRACE_BASE_C_DEC,
@@ -162,7 +162,7 @@ namespace pb_ds
       typedef cond_dealtor< node, Allocator> cond_dealtor_t;
 
 #ifdef _GLIBCXX_DEBUG
-      typedef PB_DS_MAP_DEBUG_BASE_C_DEC map_debug_base;
+      typedef PB_DS_DEBUG_MAP_BASE_C_DEC debug_base;
 #endif 
 
     public:
@@ -489,7 +489,7 @@ namespace pb_ds
 
 #undef PB_DS_TYPES_TRAITS_C_DEC
 
-#undef PB_DS_MAP_DEBUG_BASE_C_DEC
+#undef PB_DS_DEBUG_MAP_BASE_C_DEC
 
 #ifdef PB_DS_TREE_TRACE
 #undef PB_DS_TREE_TRACE_BASE_C_DEC
index a6ee920012797cd2dd10633d3723dc37a5eac4be..295a57aee17fb724f96287fe816686dde6d3103f 100644 (file)
@@ -81,7 +81,7 @@ PB_DS_CLASS_T_DEC
 PB_DS_CLASS_C_DEC::
 PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
 #ifdef _GLIBCXX_DEBUG
-  map_debug_base(other),
+  debug_base(other),
 #endif 
 #ifdef PB_DS_TREE_TRACE
   PB_DS_TREE_TRACE_BASE_C_DEC(other),
@@ -105,7 +105,7 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
       }
     catch(...)
       {
-        _GLIBCXX_DEBUG_ONLY(map_debug_base::clear();)
+        _GLIBCXX_DEBUG_ONLY(debug_base::clear();)
        s_node_allocator.deallocate(m_p_head, 1);
         __throw_exception_again;
       }
@@ -130,7 +130,7 @@ void
 PB_DS_CLASS_C_DEC::
 value_swap(PB_DS_CLASS_C_DEC& other)
 {
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::swap(other);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::swap(other);)
   std::swap(m_p_head, other.m_p_head);
   std::swap(m_size, other.m_size);
 }
index eff970a36954705dd10a3c8b50d31a639191584c..d0a0752dee0b6e386f7e10f9c9a86d9523757f1a 100644 (file)
@@ -251,7 +251,7 @@ void
 PB_DS_CLASS_C_DEC::
 assert_consistent_with_debug_base() const
 {
-  map_debug_base::check_size(m_size);
+  debug_base::check_size(m_size);
   assert_consistent_with_debug_base(m_p_head->m_p_parent);
 }
 
@@ -262,7 +262,7 @@ assert_consistent_with_debug_base(const node_pointer p_nd) const
 {
   if (p_nd == NULL)
     return;
-  map_debug_base::check_key_exists(PB_DS_V2F(p_nd->m_value));
+  debug_base::check_key_exists(PB_DS_V2F(p_nd->m_value));
   assert_consistent_with_debug_base(p_nd->m_p_left);
   assert_consistent_with_debug_base(p_nd->m_p_right);
 }
index 2006a82b68060cd34424a010fd56e05f964d8b08..21c116f2fd0038a306712f854f504f9923009613 100644 (file)
@@ -102,7 +102,7 @@ clear()
 
   initialize();
 
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::clear();)
+  _GLIBCXX_DEBUG_ONLY(debug_base::clear();)
 
     _GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
     }
index 91fe41ab9d265f1c30704d8bbaada6556a2aaa65..0f50f2262b7da2bcbbff5fce5238c5389233a34e 100644 (file)
@@ -82,13 +82,13 @@ insert_leaf(const_reference r_value)
     {
       _GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
 
-        _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(
+        _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(
                                                        PB_DS_V2F(r_value)));
 
       return (std::make_pair(p_pot, false));
     }
 
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(
+  _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(
                                                          PB_DS_V2F(r_value)));
 
   p_nd = p_pot->m_p_left;
@@ -146,7 +146,7 @@ insert_leaf_new(const_reference r_value, node_pointer p_nd, bool left_nd)
 
   update_to_top(p_new_nd, (node_update* )this);
 
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(
+  _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(
                                            PB_DS_V2F(r_value)));
 
   return (iterator(p_new_nd));
@@ -167,7 +167,7 @@ insert_imp_empty(const_reference r_value)
 
   p_new_node->m_p_left = p_new_node->m_p_right = NULL;
 
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(
+  _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(
                                            PB_DS_V2F(r_value)));
 
   update_to_top(m_p_head->m_p_parent, (node_update* )this);
index 2bad9795b2bdeea1e0a92c77890cce924dfc616b..303813ccd2f09be425ea98a70fdf17669795bdc3 100644 (file)
@@ -102,7 +102,7 @@ clear()
 
   initialize();
 
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::clear();)
+  _GLIBCXX_DEBUG_ONLY(debug_base::clear();)
 
     _GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
     }
index 2c8e77dedf52d812e25dd983b208a04aa2229f07..672560467d6bf8c028beb21937a0e604b79389ca 100644 (file)
@@ -71,7 +71,7 @@ join_prep(PB_DS_CLASS_C_DEC& other)
     value_swap(other);
 
   m_size += other.m_size;
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::join(other);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::join(other);)
   return true;
 }
 
@@ -123,7 +123,7 @@ split_prep(const_key_reference r_key, PB_DS_CLASS_C_DEC& other)
       return false;
     }
 
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::split(r_key,(Cmp_Fn& )(*this), other);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::split(r_key,(Cmp_Fn& )(*this), other);)
   return true;
 }
 
index 67c35a63b699035ab0d3d9155f8c1b67fa241e94..5636cdc1243834835102b31619bc0153f3e66025 100644 (file)
@@ -53,7 +53,7 @@
 #include <ext/pb_ds/exception.hpp>
 #include <ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp>
 #ifdef _GLIBCXX_DEBUG
-#include <ext/pb_ds/detail/map_debug_base.hpp>
+#include <ext/pb_ds/detail/debug_map_base.hpp>
 #endif 
 #ifdef PB_DS_HT_MAP_TRACE_
 #include <iostream>
@@ -92,8 +92,8 @@ namespace pb_ds
     types_traits<Key, Mapped, Allocator, Store_Hash>
 
 #ifdef _GLIBCXX_DEBUG
-#define PB_DS_MAP_DEBUG_BASE_C_DEC \
-    map_debug_base<Key,        Eq_Fn, typename Allocator::template rebind<Key>::other::const_reference>
+#define PB_DS_DEBUG_MAP_BASE_C_DEC \
+    debug_map_base<Key,        Eq_Fn, typename Allocator::template rebind<Key>::other::const_reference>
 #endif 
 
 #ifdef PB_DS_DATA_TRUE_INDICATOR
@@ -117,7 +117,7 @@ namespace pb_ds
             typename Resize_Policy >
     class PB_DS_CLASS_NAME:
 #ifdef _GLIBCXX_DEBUG
-      protected PB_DS_MAP_DEBUG_BASE_C_DEC,
+      protected PB_DS_DEBUG_MAP_BASE_C_DEC,
 #endif 
       public PB_DS_HASH_EQ_FN_C_DEC,
       public Resize_Policy,
@@ -154,7 +154,7 @@ namespace pb_ds
       typedef Resize_Policy resize_base;
 
 #ifdef _GLIBCXX_DEBUG
-      typedef PB_DS_MAP_DEBUG_BASE_C_DEC map_debug_base;
+      typedef PB_DS_DEBUG_MAP_BASE_C_DEC debug_base;
 #endif 
 
 #define PB_DS_GEN_POS std::pair<entry_pointer, typename Allocator::size_type>
@@ -390,11 +390,11 @@ namespace pb_ds
        resize_base::notify_insert_search_end();
        if (p_e != NULL)
          {
-           _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+           _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
            return (p_e->m_value.second);
          }
 
-       _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+       _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
        return insert_new_imp(value_type(r_key, mapped_type()), pos)->second;
       }
 
@@ -415,11 +415,11 @@ namespace pb_ds
        resize_base::notify_insert_search_end();
        if (p_e != NULL)
          {
-           _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+           _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
            return p_e->m_value.second;
          }
 
-       _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+       _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
        return insert_new_imp(value_type(r_key, mapped_type()), 
                              pos_hash_pair)->second;
       }
@@ -445,7 +445,7 @@ namespace pb_ds
        m_entries[pos] = p_e;
        resize_base::notify_inserted(++m_num_used_e);
 
-       _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(PB_DS_V2F(r_val));)
+       _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
        _GLIBCXX_DEBUG_ONLY(assert_valid();)
        return &p_e->m_value;
       }
@@ -464,7 +464,7 @@ namespace pb_ds
        p_e->m_p_next = m_entries[r_pos_hash_pair.first];
        m_entries[r_pos_hash_pair.first] = p_e;
        resize_base::notify_inserted(++m_num_used_e);
-       _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(PB_DS_V2F(r_val));)
+       _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
        _GLIBCXX_DEBUG_ONLY(assert_valid();)
        return &p_e->m_value;
       }
@@ -485,9 +485,9 @@ namespace pb_ds
 
 #ifdef _GLIBCXX_DEBUG
        if (p_e == NULL)
-         map_debug_base::check_key_does_not_exist(r_key);
+         debug_base::check_key_does_not_exist(r_key);
        else
-         map_debug_base::check_key_exists(r_key);
+         debug_base::check_key_exists(r_key);
 #endif 
        return &p_e->m_value;
       }
@@ -511,9 +511,9 @@ namespace pb_ds
 
 #ifdef _GLIBCXX_DEBUG
        if (p_e == NULL)
-         map_debug_base::check_key_does_not_exist(r_key);
+         debug_base::check_key_does_not_exist(r_key);
        else
-         map_debug_base::check_key_exists(r_key);
+         debug_base::check_key_exists(r_key);
 #endif 
        return &p_e->m_value;
       }
@@ -632,7 +632,7 @@ namespace pb_ds
 #undef PB_DS_HASH_EQ_FN_C_DEC
 #undef PB_DS_RANGED_HASH_FN_C_DEC
 #undef PB_DS_TYPES_TRAITS_C_DEC
-#undef PB_DS_MAP_DEBUG_BASE_C_DEC
+#undef PB_DS_DEBUG_MAP_BASE_C_DEC
 #undef PB_DS_CLASS_NAME
 #undef PB_DS_V2F
 #undef PB_DS_V2S
index 9223da5d6f93dbcae97a01a1518212bfbf1f0825..3a4c422839dfc1829970e2f38630dd83510436cd 100644 (file)
@@ -68,7 +68,7 @@ cmp_with_other(const Other_Map_Type& other) const
 
       const_mapped_pointer p_mapped_value =
        const_cast<PB_DS_CLASS_C_DEC& >(*this).
-       find_key_pointer(r_key, traits_base::m_store_hash_indicator);
+       find_key_pointer(r_key, traits_base::m_store_extra_indicator);
 
       if (p_mapped_value == NULL)
        return false;
index 7da4d8a1e7910f05327aa0ceadb1f3f5d24a57da..e767bbec51fb94b9ef543793c8cec85bb87e87f5 100644 (file)
@@ -130,7 +130,7 @@ PB_DS_CLASS_T_DEC
 PB_DS_CLASS_C_DEC::
 PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
 #ifdef _GLIBCXX_DEBUG
-  map_debug_base(other),
+  debug_base(other),
 #endif 
   PB_DS_HASH_EQ_FN_C_DEC(other),
   resize_base(other), ranged_hash_fn_base(other),
@@ -171,7 +171,7 @@ swap(PB_DS_CLASS_C_DEC& other)
   hash_eq_fn_base::swap(other);
   resize_base::swap(other);
 
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::swap(other));
+  _GLIBCXX_DEBUG_ONLY(debug_base::swap(other));
   _GLIBCXX_DEBUG_ONLY(assert_valid());
   _GLIBCXX_DEBUG_ONLY(other.assert_valid());
 }
index f2b41b37bca63c9a3ff1a2e1e2ebe6f98887b471..2d4859a6106d99e33cee0ef13465bc4862963300 100644 (file)
@@ -57,5 +57,5 @@ constructor_insert_new_imp(const_mapped_reference r_val, size_type pos,
   // At this point no exceptions can be thrown.
   p->m_p_next = m_entries[pos];
   m_entries[pos] = p;
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(r_key);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(r_key);)
 }
index 08a0b7b3fce132e26a48e5168c76fecfd9b3db53..52759dec20d7a44816df7b4a2d069a1e93fe732f 100644 (file)
@@ -58,5 +58,5 @@ constructor_insert_new_imp(const_reference r_val, size_type pos, true_type)
   p->m_hash = ranged_hash_fn_base::operator()((const_key_reference)(PB_DS_V2F(p->m_value))).second;
 
   m_entries[pos] = p;
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(r_key);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(r_key);)
 }
index 61cbfa90d2e13a79d8360b09e453883e8f900907..fdf7dbcad35273b5709d8dd49cacfdc23bec1628 100644 (file)
@@ -51,7 +51,7 @@ void
 PB_DS_CLASS_C_DEC::
 assert_valid() const
 {
-  map_debug_base::check_size(m_num_used_e);
+  debug_base::check_size(m_num_used_e);
   assert_entry_pointer_array_valid(m_entries);
 }
 
@@ -67,7 +67,7 @@ assert_entry_pointer_array_valid(const entry_pointer_array a_p_entries) const
       while (p_e != NULL)
         {
          ++iterated_num_used_e;
-         assert_entry_pointer_valid(p_e, traits_base::m_store_hash_indicator);
+         assert_entry_pointer_valid(p_e, traits_base::m_store_extra_indicator);
          p_e = p_e->m_p_next;
         }
     }
index d179a3dc941a4c7bda264faf307d271e8578be05..4e01b6ae152b5be927f5313d28e823ebdaf9fc0a 100644 (file)
@@ -50,6 +50,6 @@ PB_DS_CLASS_T_DEC
 void
 PB_DS_CLASS_C_DEC::
 assert_entry_pointer_valid(const entry_pointer p, false_type) const
-{ map_debug_base::check_key_exists(PB_DS_V2F(p->m_value)); }
+{ debug_base::check_key_exists(PB_DS_V2F(p->m_value)); }
 
 #endif 
index 48dc555abea2d9975888353900b8d5b39be2c4e6..2e7e2ff3482ce94483fbf4dbf6df90e2a5638727 100644 (file)
@@ -51,7 +51,7 @@ void
 PB_DS_CLASS_C_DEC::
 assert_entry_pointer_valid(const entry_pointer p_e, true_type) const
 {
-  map_debug_base::check_key_exists(PB_DS_V2F(p_e->m_value));
+  debug_base::check_key_exists(PB_DS_V2F(p_e->m_value));
   comp_hash pos_hash_pair = ranged_hash_fn_base::operator()(PB_DS_V2F(p_e->m_value));
   _GLIBCXX_DEBUG_ASSERT(p_e->m_hash == pos_hash_pair.second);
 }
index 265a7052780f1f284ba5c33d3de4990f8c915d0c..95c3fed7a4580d986106bd8056d7ccf2ca16f6b0 100644 (file)
@@ -49,7 +49,7 @@ inline void
 PB_DS_CLASS_C_DEC::
 erase_entry_pointer(entry_pointer& r_p_e)
 {
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::erase_existing(PB_DS_V2F(r_p_e->m_value)));
+  _GLIBCXX_DEBUG_ONLY(debug_base::erase_existing(PB_DS_V2F(r_p_e->m_value)));
 
   entry_pointer p_e = r_p_e;
   r_p_e = r_p_e->m_p_next;
index 13a3a6d4d34af54309f95348199e9d3a433f0e93..28553b1a8dd23153f959e99d61a915da181fc014 100644 (file)
@@ -65,7 +65,7 @@ erase_in_pos_imp(const_key_reference r_key, size_type pos)
   if (p_e == NULL)
     {
       resize_base::notify_erase_search_end();
-      _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+      _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
       _GLIBCXX_DEBUG_ONLY(assert_valid();)
       return false;
     }
@@ -73,7 +73,7 @@ erase_in_pos_imp(const_key_reference r_key, size_type pos)
   if (hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value), r_key))
     {
       resize_base::notify_erase_search_end();
-      _GLIBCXX_DEBUG_ONLY(map_debug_base:: check_key_exists(r_key);)
+      _GLIBCXX_DEBUG_ONLY(debug_base:: check_key_exists(r_key);)
       erase_entry_pointer(m_entries[pos]);
       do_resize_if_needed_no_throw();
       _GLIBCXX_DEBUG_ONLY(assert_valid();)
@@ -86,7 +86,7 @@ erase_in_pos_imp(const_key_reference r_key, size_type pos)
       if (p_next_e == NULL)
         {
          resize_base::notify_erase_search_end();
-         _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+         _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
           _GLIBCXX_DEBUG_ONLY(assert_valid();)
           return false;
         }
@@ -94,7 +94,7 @@ erase_in_pos_imp(const_key_reference r_key, size_type pos)
       if (hash_eq_fn_base::operator()(PB_DS_V2F(p_next_e->m_value), r_key))
         {
          resize_base::notify_erase_search_end();
-         _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+         _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
           erase_entry_pointer(p_e->m_p_next);
          do_resize_if_needed_no_throw();
          _GLIBCXX_DEBUG_ONLY(assert_valid();)
index 7eb821e0fe6829373f876e6ce745f4405fd77d79..a6eff1fc4e6819f67ddd3017b75e234ec27f024c 100644 (file)
@@ -56,7 +56,7 @@ erase_in_pos_imp(const_key_reference r_key, const comp_hash& r_pos_hash_pair)
   if (p_e == NULL)
     {
       resize_base::notify_erase_search_end();
-      _GLIBCXX_DEBUG_ONLY(map_debug_base:: check_key_does_not_exist(r_key);)
+      _GLIBCXX_DEBUG_ONLY(debug_base:: check_key_does_not_exist(r_key);)
       _GLIBCXX_DEBUG_ONLY(assert_valid();)
       return false;
     }
@@ -65,7 +65,7 @@ erase_in_pos_imp(const_key_reference r_key, const comp_hash& r_pos_hash_pair)
                                  r_key, r_pos_hash_pair.second))
     {
       resize_base::notify_erase_search_end();
-      _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+      _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
       erase_entry_pointer(m_entries[r_pos_hash_pair.first]);
       do_resize_if_needed_no_throw();
       _GLIBCXX_DEBUG_ONLY(assert_valid();)
@@ -78,7 +78,7 @@ erase_in_pos_imp(const_key_reference r_key, const comp_hash& r_pos_hash_pair)
       if (p_next_e == NULL)
         {
          resize_base::notify_erase_search_end();
-         _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+         _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
           _GLIBCXX_DEBUG_ONLY(assert_valid();)
           return false;
         }
@@ -88,7 +88,7 @@ erase_in_pos_imp(const_key_reference r_key, const comp_hash& r_pos_hash_pair)
                                      r_pos_hash_pair.second))
         {
          resize_base::notify_erase_search_end();
-         _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+         _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
           erase_entry_pointer(p_e->m_p_next);
          do_resize_if_needed_no_throw();
          _GLIBCXX_DEBUG_ONLY(assert_valid();)
index 519072a2e9e6492c070763439d9f9e4a16332377..ee85ed1dcdcf2b57f23053e358fc136dd024cfd2 100644 (file)
@@ -85,7 +85,7 @@ cmp_with_other(const Other_Map_Type& other) const
       const_key_reference r_key =(const_key_reference)PB_DS_V2F(*it);
       const_mapped_pointer p_mapped_value =
        const_cast<PB_DS_CLASS_C_DEC& >(*this).
-       find_key_pointer(r_key, traits_base::m_store_hash_indicator);
+       find_key_pointer(r_key, traits_base::m_store_extra_indicator);
 
       if (p_mapped_value == NULL)
        return false;
index fd158f921ad3a33fc54a12cbda7bb9241ba5b15d..516a409e0a81eac4f9a107a582ee04422ab5400f 100644 (file)
@@ -66,11 +66,11 @@ insert_imp(const_reference r_val, false_type)
   resize_base::notify_insert_search_end();
   if (p_e != NULL)
     {
-      _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+      _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
       return std::make_pair(&p_e->m_value, false);
     }
 
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
   return std::make_pair(insert_new_imp(r_val, pos), true);
 }
 
index 128e11fdc0fca5adcaa35830419cb125040343d0..d7d0a61155b4f569ff11954df363d4da3a7c475d 100644 (file)
@@ -67,11 +67,11 @@ insert_imp(const_reference r_val, true_type)
   resize_base::notify_insert_search_end();
   if (p_e != NULL)
     {
-      _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(key);)
+      _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(key);)
       return std::make_pair(&p_e->m_value, false);
     }
 
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(key);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(key);)
   return std::make_pair(insert_new_imp(r_val, pos_hash_pair), true);
 }
 
similarity index 89%
rename from libstdc++-v3/include/ext/pb_ds/detail/map_debug_base.hpp
rename to libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp
index 95c164ace000d9243146fff26e1d5f1fc79106b6..373b0f6c78e76eb29aec4f79bd5afbc352ca572b 100644 (file)
 // warranty.
  
 /**
- * @file map_debug_base.hpp
+ * @file debug_map_base.hpp
  * Contains a debug-mode base for all maps.
  */
 
-#ifndef PB_DS_MAP_DEBUG_BASE_HPP
-#define PB_DS_MAP_DEBUG_BASE_HPP
+#ifndef PB_DS_DEBUG_MAP_BASE_HPP
+#define PB_DS_DEBUG_MAP_BASE_HPP
 
 #ifdef _GLIBCXX_DEBUG
 
@@ -59,15 +59,21 @@ namespace pb_ds
 {
   namespace detail
   {
+    // Need std::pair ostream extractor.
+    template<typename _CharT, typename _Traits, typename _Tp1, typename _Tp2>
+    inline std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __out, 
+              const std::pair<_Tp1, _Tp2>& p)
+    { return (__out << '(' << p.first << ',' << p.second << ')'); }
 
 #define PB_DS_CLASS_T_DEC \
     template<typename Key, class Eq_Fn, typename Const_Key_Reference>
 
 #define PB_DS_CLASS_C_DEC \
-    map_debug_base<Key, Eq_Fn, Const_Key_Reference>
+    debug_map_base<Key, Eq_Fn, Const_Key_Reference>
 
     template<typename Key, class Eq_Fn, typename Const_Key_Reference>
-    class map_debug_base
+    class debug_map_base
     {
     private:
       typedef typename std::allocator< Key> key_allocator;
@@ -77,11 +83,11 @@ namespace pb_ds
       typedef Const_Key_Reference const_key_reference;
 
     protected:
-      map_debug_base();
+      debug_map_base();
 
-      map_debug_base(const PB_DS_CLASS_C_DEC& other);
+      debug_map_base(const PB_DS_CLASS_C_DEC& other);
 
-      ~map_debug_base();
+      ~debug_map_base();
 
       inline void
       insert_new(const_key_reference r_key);
@@ -133,17 +139,17 @@ namespace pb_ds
 
     PB_DS_CLASS_T_DEC
     PB_DS_CLASS_C_DEC::
-    map_debug_base()
+    debug_map_base()
     { _GLIBCXX_DEBUG_ONLY(assert_valid();) }
 
     PB_DS_CLASS_T_DEC
     PB_DS_CLASS_C_DEC::
-    map_debug_base(const PB_DS_CLASS_C_DEC& other) : m_key_set(other.m_key_set)
+    debug_map_base(const PB_DS_CLASS_C_DEC& other) : m_key_set(other.m_key_set)
     { _GLIBCXX_DEBUG_ONLY(assert_valid();) }
 
     PB_DS_CLASS_T_DEC
     PB_DS_CLASS_C_DEC::
-    ~map_debug_base()
+    ~debug_map_base()
     { _GLIBCXX_DEBUG_ONLY(assert_valid();) }
 
     PB_DS_CLASS_T_DEC
@@ -157,7 +163,7 @@ namespace pb_ds
       alloc.set_throw_prob(0);
       if (find(r_key) != m_key_set.end())
        {
-         std::cerr << "insert_new " << r_key << std::endl;
+         std::cerr << "insert_new" << r_key << std::endl;
          std::abort();
        }
 
@@ -167,7 +173,7 @@ namespace pb_ds
        }
       catch(...)
        {
-         std::cerr << "insert_new 1" << r_key << std::endl;
+         std::cerr << "insert_new" << r_key << std::endl;
          std::abort();
        }
       alloc.set_throw_prob(orig_throw_prob);
@@ -183,7 +189,7 @@ namespace pb_ds
       key_set_iterator it = find(r_key);
       if (it == m_key_set.end())
        {
-         std::cerr << "erase_existing " << r_key << std::endl;
+         std::cerr << "erase_existing" << r_key << std::endl;
          std::abort();
        }
       m_key_set.erase(it);
@@ -208,7 +214,7 @@ namespace pb_ds
       _GLIBCXX_DEBUG_ONLY(assert_valid();)
       if (find(r_key) == m_key_set.end())
         {
-          std::cerr << "check_key_exists " << r_key << std::endl;
+          std::cerr << "check_key_exists" << r_key << std::endl;
           std::abort();
         }
       _GLIBCXX_DEBUG_ONLY(assert_valid();)
@@ -222,7 +228,9 @@ namespace pb_ds
       _GLIBCXX_DEBUG_ONLY(assert_valid();)
       if (find(r_key) != m_key_set.end())
         {
-         std::cerr << "check_key_does_not_exist " << r_key << std::endl;
+         using std::cerr;
+         using std::endl;
+         cerr << "check_key_does_not_exist" << r_key << endl;
           std::abort();
         }
     }
index 30b8d3e7b73aced494e56d79de605c161c03cdb1..6f4844cf00d595961ec432414d979040f5531807 100644 (file)
@@ -140,7 +140,7 @@ PB_DS_CLASS_T_DEC
 PB_DS_CLASS_C_DEC::
 PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
 #ifdef _GLIBCXX_DEBUG
-  map_debug_base(other),
+  debug_base(other),
 #endif 
   hash_eq_fn_base(other),
   resize_base(other),
@@ -187,7 +187,7 @@ swap(PB_DS_CLASS_C_DEC& other)
   ranged_probe_fn_base::swap(other);
   hash_eq_fn_base::swap(other);
   resize_base::swap(other);
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::swap(other));
+  _GLIBCXX_DEBUG_ONLY(debug_base::swap(other));
   _GLIBCXX_DEBUG_ONLY(assert_valid());
   _GLIBCXX_DEBUG_ONLY(other.assert_valid());
 }
index df4af951f1a47ca9221338ed26998c05208087e1..30df973b1eb7a802de3834b75605a29a42f28c04 100644 (file)
@@ -55,5 +55,5 @@ constructor_insert_new_imp(const_mapped_reference r_val, size_type pos,
   entry* const p_e = m_entries + pos;
   new (&p_e->m_value) mapped_value_type(r_val);
   p_e->m_stat = valid_entry_status;
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(p_e->m_value.first);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(p_e->m_value.first);)
 }
index 0e17e36efc17c6f1a50dde6dd07a5aaa2925c698..df8797ae7e732bd05d53caea66c8a5247ce3d326 100644 (file)
@@ -56,5 +56,5 @@ constructor_insert_new_imp(const_mapped_reference r_val, size_type pos,
   new (&p_e->m_value) mapped_value_type(r_val);
   p_e->m_hash = ranged_probe_fn_base::operator()(PB_DS_V2F(r_val)).second;
   p_e->m_stat = valid_entry_status;
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(p_e->m_value.first);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(p_e->m_value.first);)
 }
index fd8ca9abe12a210d8541fa460bd64766876c6a72..15bae0d9d6cefba412002856fde269ab7a8e00ee 100644 (file)
@@ -51,7 +51,7 @@ void
 PB_DS_CLASS_C_DEC::
 assert_valid() const
 {
-  map_debug_base::check_size(m_num_used_e);
+  debug_base::check_size(m_num_used_e);
   assert_entry_array_valid(m_entries, traits_base::m_store_extra_indicator);
 }
 
index 9d3d428e3afa5a57e164139c4f647e1e1596bdad..1a8e525e7242d3065990ed2432c1da99707a1754 100644 (file)
@@ -63,7 +63,7 @@ assert_entry_array_valid(const entry_array a_entries, false_type) const
         case valid_entry_status:
          {
            const_key_reference r_key = PB_DS_V2F(p_e->m_value);
-           map_debug_base::check_key_exists(r_key);
+           debug_base::check_key_exists(r_key);
            ++iterated_num_used_e;
            break;
          }
index a4d8b6c651aa8ee917e8213b3c911e31af4ab761..7acfe4c0f81b693f491fa9d9f670cc8b1919d238 100644 (file)
@@ -64,7 +64,7 @@ assert_entry_array_valid(const entry_array a_entries, true_type) const
         case valid_entry_status:
          {
            const_key_reference r_key = PB_DS_V2F(p_e->m_value);
-           map_debug_base::check_key_exists(r_key);
+           debug_base::check_key_exists(r_key);
 
            const comp_hash pos_hash_pair = ranged_probe_fn_base::operator()(r_key);
 
index 9da8507258634fabdca6711fbdfcb452e7a7021f..3d194cf365f202c94683836b7e9bff967e3e6047 100644 (file)
@@ -50,7 +50,7 @@ PB_DS_CLASS_C_DEC::
 erase_entry(entry_pointer p_e)
 {
   _GLIBCXX_DEBUG_ASSERT(p_e->m_stat = valid_entry_status);
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::erase_existing(PB_DS_V2F(p_e->m_value));)
+  _GLIBCXX_DEBUG_ONLY(debug_base::erase_existing(PB_DS_V2F(p_e->m_value));)
   p_e->m_value.~value_type();
   p_e->m_stat = erased_entry_status;
   _GLIBCXX_DEBUG_ASSERT(m_num_used_e > 0);
index 51acec9d4b3492b81f6e462689e74a6dcb08fc86..a8959278b6317b5f1708841c9f4675b7d9622bed 100644 (file)
@@ -64,7 +64,7 @@ erase_imp(const_key_reference r_key,  false_type)
         case empty_entry_status:
          {
            resize_base::notify_erase_search_end();
-           _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(
+           _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(
                                                                    r_key));
            return false;
          }
index 71c498b469853a27c9de79e2bfa2827fee3188a5..cf479082a7a2c973a60ca0aca7aef420079816d9 100644 (file)
@@ -63,7 +63,7 @@ erase_imp(const_key_reference r_key, true_type)
         case empty_entry_status:
          {
            resize_base::notify_erase_search_end();
-           _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(
+           _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(
                                                                    r_key));
            return false;
          }
index 24a9f1bf3ba2260b2e4b9f118068b3244ca71535..88f250162ad8e38e02b50418aec57bec0f301dd8 100644 (file)
@@ -54,7 +54,7 @@
 #include <iostream>
 #endif 
 #ifdef _GLIBCXX_DEBUG
-#include <ext/pb_ds/detail/map_debug_base.hpp>
+#include <ext/pb_ds/detail/debug_map_base.hpp>
 #endif
 #include <debug/debug.h>
 
@@ -89,8 +89,8 @@ namespace pb_ds
     types_traits<Key, Mapped, Allocator, Store_Hash>
 
 #ifdef _GLIBCXX_DEBUG
-#define PB_DS_MAP_DEBUG_BASE_C_DEC \
-    map_debug_base<Key, Eq_Fn, typename Allocator::template rebind<Key>::other::const_reference>
+#define PB_DS_DEBUG_MAP_BASE_C_DEC \
+    debug_map_base<Key, Eq_Fn, typename Allocator::template rebind<Key>::other::const_reference>
 #endif 
 
 #ifdef PB_DS_DATA_TRUE_INDICATOR
@@ -114,7 +114,7 @@ namespace pb_ds
             typename Resize_Policy>
     class PB_DS_CLASS_NAME :
 #ifdef _GLIBCXX_DEBUG
-      protected PB_DS_MAP_DEBUG_BASE_C_DEC,
+      protected PB_DS_DEBUG_MAP_BASE_C_DEC,
 #endif 
       public PB_DS_HASH_EQ_FN_C_DEC,
       public Resize_Policy,
@@ -152,7 +152,7 @@ namespace pb_ds
       typedef PB_DS_RANGED_PROBE_FN_C_DEC ranged_probe_fn_base;
 
 #ifdef _GLIBCXX_DEBUG
-      typedef PB_DS_MAP_DEBUG_BASE_C_DEC map_debug_base;
+      typedef PB_DS_DEBUG_MAP_BASE_C_DEC debug_base;
 #endif 
 
       typedef PB_DS_HASH_EQ_FN_C_DEC hash_eq_fn_base;
@@ -410,7 +410,7 @@ namespace pb_ds
        p_e->m_stat = valid_entry_status;
        resize_base::notify_inserted(++m_num_used_e);
 
-       _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(PB_DS_V2F(p_e->m_value));)
+       _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(p_e->m_value));)
 
        _GLIBCXX_DEBUG_ONLY(assert_valid();)
        return &p_e->m_value;
@@ -436,7 +436,7 @@ namespace pb_ds
 
        resize_base::notify_inserted(++m_num_used_e);
 
-       _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(PB_DS_V2F(p_e->m_value));)
+       _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(p_e->m_value));)
 
        _GLIBCXX_DEBUG_ONLY(assert_valid();)
        return &p_e->m_value;
@@ -455,7 +455,7 @@ namespace pb_ds
        if (p_e->m_stat != valid_entry_status)
          return insert_new_imp(value_type(key, mapped_type()), pos)->second;
 
-       _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(key);)       
+       _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(key);)   
        return p_e->m_value.second;
       }
 
@@ -471,7 +471,7 @@ namespace pb_ds
          return insert_new_imp(value_type(key, mapped_type()),
                                 pos_hash_pair)->second;
 
-       _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(key));
+       _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(key));
        return (m_entries + pos_hash_pair.first)->m_value.second;
       }
 #endif
@@ -494,7 +494,7 @@ namespace pb_ds
              case empty_entry_status:
                {
                  resize_base::notify_find_search_end();
-                 _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(key);)
+                 _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(key);)
 
                    return NULL;
                }
@@ -503,7 +503,7 @@ namespace pb_ds
                if (hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value), key))
                  {
                    resize_base::notify_find_search_end();
-                   _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(key);)
+                   _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(key);)
 
                    return pointer(&p_e->m_value);
                  }
@@ -517,7 +517,7 @@ namespace pb_ds
            resize_base::notify_find_search_collision();
          }
 
-       _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(key);)
+       _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(key);)
        resize_base::notify_find_search_end();
        return NULL;
       }
@@ -542,7 +542,7 @@ namespace pb_ds
              case empty_entry_status:
                {
                  resize_base::notify_find_search_end();
-                 _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(key);)
+                 _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(key);)
 
                  return NULL;
                }
@@ -553,7 +553,7 @@ namespace pb_ds
                                                key, pos_hash_pair.second))
                  {
                    resize_base::notify_find_search_end();
-                   _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(key);)
+                   _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(key);)
                    return pointer(&p_e->m_value);
                  }
                break;
@@ -566,7 +566,7 @@ namespace pb_ds
            resize_base::notify_find_search_collision();
          }
 
-       _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(key);)
+       _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(key);)
        resize_base::notify_find_search_end();
        return NULL;
       }
@@ -673,7 +673,7 @@ namespace pb_ds
 #undef PB_DS_HASH_EQ_FN_C_DEC
 #undef PB_DS_RANGED_PROBE_FN_C_DEC
 #undef PB_DS_TYPES_TRAITS_C_DEC
-#undef PB_DS_MAP_DEBUG_BASE_C_DEC
+#undef PB_DS_DEBUG_MAP_BASE_C_DEC
 #undef PB_DS_CLASS_NAME
 #undef PB_DS_V2F
 #undef PB_DS_V2S
index 98d597051bdc1c93215a510465ba252b85b0e542..b5b00bd08ba161147c03c06d081ca9d89bdef090 100644 (file)
@@ -68,7 +68,7 @@ find_ins_pos(const_key_reference r_key, false_type)
         case empty_entry_status:
          {
             resize_base::notify_insert_search_end();
-            _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+            _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
            return (ins_pos == m_num_e) ? pos : ins_pos;
          }
          break;
@@ -80,7 +80,7 @@ find_ins_pos(const_key_reference r_key, false_type)
          if (hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value), r_key))
             {
              resize_base::notify_insert_search_end();
-             _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+             _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
                 return pos;
             }
          break;
@@ -107,11 +107,11 @@ insert_imp(const_reference r_val, false_type)
 
   if (m_entries[pos].m_stat == valid_entry_status)
     {
-      _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+      _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
       return std::make_pair(&(m_entries + pos)->m_value, false);
     }
 
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key));
+  _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key));
   return std::make_pair(insert_new_imp(r_val, pos), true);
 }
 
index b6445fae2e61aa2a96a62f93ff7cb0b6f9fc2989..407fcd2591fd6f947841e8a5295e21dce2e6ba38 100644 (file)
@@ -70,7 +70,7 @@ find_ins_pos(const_key_reference r_key, true_type)
         case empty_entry_status:
          {
             resize_base::notify_insert_search_end();
-            _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+            _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
 
            return ((ins_pos == m_num_e) ?
                     std::make_pair(pos, pos_hash_pair.second) :
@@ -86,7 +86,7 @@ find_ins_pos(const_key_reference r_key, true_type)
                                          r_key, pos_hash_pair.second))
             {
              resize_base::notify_insert_search_end();
-             _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+             _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
               return std::make_pair(pos, pos_hash_pair.second);
             }
          break;
@@ -114,11 +114,11 @@ insert_imp(const_reference r_val, true_type)
   entry_pointer p_e =& m_entries[pos_hash_pair.first];
   if (p_e->m_stat == valid_entry_status)
     {
-      _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key));
+      _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
       return std::make_pair(&p_e->m_value, false);
     }
 
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key));
+  _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key));
   return std::make_pair(insert_new_imp(r_val, pos_hash_pair), true);
 }
 
index a311a79757dee0b609ea479edc629e7530621b8c..a3d96ec2f28d5d6076822b30ac19de1829cefea9 100644 (file)
@@ -89,7 +89,7 @@ PB_DS_CLASS_T_DEC
 PB_DS_CLASS_C_DEC::
 PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) : 
 #ifdef _GLIBCXX_DEBUG
-  map_debug_base(),
+  debug_base(),
 #endif
 m_p_l(NULL)
 {
@@ -119,7 +119,7 @@ swap(PB_DS_CLASS_C_DEC& other)
 {
   _GLIBCXX_DEBUG_ONLY(assert_valid();)
   _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::swap(other);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::swap(other);)
   std::swap(m_p_l, other.m_p_l);
   _GLIBCXX_DEBUG_ONLY(assert_valid();)
   _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
index 1427f83749bb6d80e5919840d8a2bcebceb97aca..0ccfc97d1365bc63b25177a51dd56d19629b3f89 100644 (file)
@@ -54,10 +54,10 @@ assert_valid() const
   size_type calc_size = 0;
   for (const_iterator it = begin(); it != end(); ++it)
     {
-      map_debug_base::check_key_exists(PB_DS_V2F(*it));
+      debug_base::check_key_exists(PB_DS_V2F(*it));
       ++calc_size;
     }
-  map_debug_base::check_size(calc_size);
+  debug_base::check_size(calc_size);
 }
 
 #endif 
index 85ac02d30122f13dbbbd3a37dc9466abda829657..d4ee2a18163b625682bfae5b743059f2bb2b3201 100644 (file)
@@ -134,7 +134,7 @@ void
 PB_DS_CLASS_C_DEC::
 actual_erase_entry(entry_pointer p_l)
 {
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::erase_existing(PB_DS_V2F(p_l->m_value));)
+  _GLIBCXX_DEBUG_ONLY(debug_base::erase_existing(PB_DS_V2F(p_l->m_value));)
   p_l->~entry();
   s_entry_allocator.deallocate(p_l, 1);
 }
index 37c173de1e4dba25e3cd353644c759e9ec435188..8c792b02290b9ee376e8f578ea6183988fc8ab13 100644 (file)
@@ -54,7 +54,7 @@ find_imp(const_key_reference r_key) const
   if (s_eq_fn(r_key, PB_DS_V2F(m_p_l->m_value)))
     {
       apply_update(m_p_l, s_metadata_type_indicator);
-      _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+      _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
       return m_p_l;
     }
 
@@ -77,7 +77,7 @@ find_imp(const_key_reference r_key) const
        p_l = p_next;
     }
 
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
   return NULL;
 }
 
index af60c07b5074cd73be5f177ddcd0def65026d39e..c494c2614d43d4e7c07fa2c3276d823f66b407a4 100644 (file)
@@ -56,11 +56,11 @@ insert(const_reference r_val)
 
   if (p_l != NULL)
     {
-      _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(PB_DS_V2F(r_val));)
+      _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(PB_DS_V2F(r_val));)
       return std::make_pair(point_iterator(&p_l->m_value), false);
     }
 
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(PB_DS_V2F(r_val));)
+  _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(PB_DS_V2F(r_val));)
 
   p_l = allocate_new_entry(r_val, traits_base::m_no_throw_copies_indicator);
   p_l->m_p_next = m_p_l;
@@ -80,7 +80,7 @@ allocate_new_entry(const_reference r_val, false_type)
     value_type(r_val);
 
   cond.set_no_action();
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(PB_DS_V2F(r_val));)
+  _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
   init_entry_metadata(p_l, s_metadata_type_indicator);
   return p_l;
 }
@@ -92,7 +92,7 @@ allocate_new_entry(const_reference    r_val, true_type)
 {
   entry_pointer p_l = s_entry_allocator.allocate(1);
   new (&p_l->m_value) value_type(r_val);
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(PB_DS_V2F(r_val));)
+  _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
   init_entry_metadata(p_l, s_metadata_type_indicator);
   return p_l;
 }
index e99dc735ab4d358a66a0e7790c9e13d17a55f3d5..f39baa0f39dc5bb4bc4b9216c525ff34900a33dd 100644 (file)
@@ -52,7 +52,7 @@
 #include <ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp>
 #include <ext/pb_ds/exception.hpp>
 #ifdef _GLIBCXX_DEBUG
-#include <ext/pb_ds/detail/map_debug_base.hpp>
+#include <ext/pb_ds/detail/debug_map_base.hpp>
 #endif 
 #ifdef PB_DS_LU_MAP_TRACE_
 #include <iostream>
@@ -82,8 +82,8 @@ namespace pb_ds
     types_traits<Key, Mapped, Allocator, false>
 
 #ifdef _GLIBCXX_DEBUG
-#define PB_DS_MAP_DEBUG_BASE_C_DEC \
-    map_debug_base<Key, Eq_Fn, \
+#define PB_DS_DEBUG_MAP_BASE_C_DEC \
+    debug_map_base<Key, Eq_Fn, \
              typename Allocator::template rebind<Key>::other::const_reference>
 #endif 
 
@@ -108,7 +108,7 @@ namespace pb_ds
             class Update_Policy>
     class PB_DS_CLASS_NAME :
 #ifdef _GLIBCXX_DEBUG
-      protected PB_DS_MAP_DEBUG_BASE_C_DEC,
+      protected PB_DS_DEBUG_MAP_BASE_C_DEC,
 #endif 
       public PB_DS_TYPES_TRAITS_C_DEC
     {
@@ -148,7 +148,7 @@ namespace pb_ds
 
 
 #ifdef _GLIBCXX_DEBUG
-      typedef PB_DS_MAP_DEBUG_BASE_C_DEC map_debug_base;
+      typedef PB_DS_DEBUG_MAP_BASE_C_DEC debug_base;
 #endif 
 
       typedef cond_dealtor<entry, Allocator> cond_dealtor_t;
@@ -355,7 +355,7 @@ namespace pb_ds
 #undef PB_DS_CLASS_T_DEC
 #undef PB_DS_CLASS_C_DEC
 #undef  PB_DS_TYPES_TRAITS_C_DEC
-#undef PB_DS_MAP_DEBUG_BASE_C_DEC
+#undef PB_DS_DEBUG_MAP_BASE_C_DEC
 #undef PB_DS_CLASS_NAME
 #undef PB_DS_V2F
 #undef PB_DS_EP2VP
index 83a47250f83fdd7fa344742369f525f48f1cb95c..0f50317b879f9fecb18b730750c9b03b35e7272a 100644 (file)
@@ -86,7 +86,7 @@ PB_DS_CLASS_T_DEC
 PB_DS_CLASS_C_DEC::
 PB_DS_OV_TREE_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
 #ifdef _GLIBCXX_DEBUG
-  map_debug_base(other),
+  debug_base(other),
 #endif 
 #ifdef PB_DS_TREE_TRACE
   PB_DS_TREE_TRACE_BASE_C_DEC(other),
@@ -166,7 +166,7 @@ copy_from_ordered_range(It first_it, It last_it)
   const_iterator dbg_it = m_a_values;
   while (dbg_it != m_end_it)
     {
-      map_debug_base::insert_new(PB_DS_V2F(*dbg_it));
+      debug_base::insert_new(PB_DS_V2F(*dbg_it));
       dbg_it++;
     }
   PB_DS_CLASS_C_DEC::assert_valid();
@@ -219,7 +219,7 @@ copy_from_ordered_range(It first_it, It last_it, It other_first_it,
   const_iterator dbg_it = m_a_values;
   while (dbg_it != m_end_it)
     {
-      map_debug_base::insert_new(PB_DS_V2F(*dbg_it));
+      debug_base::insert_new(PB_DS_V2F(*dbg_it));
       dbg_it++;
     }
   PB_DS_CLASS_C_DEC::assert_valid();
@@ -246,7 +246,7 @@ value_swap(PB_DS_CLASS_C_DEC& other)
   std::swap(m_a_metadata, other.m_a_metadata);
   std::swap(m_size, other.m_size);
   std::swap(m_end_it, other.m_end_it);
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::swap(other);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::swap(other);)
 }
 
 PB_DS_CLASS_T_DEC
index b1a36555ce337bcb3926fbbb3de7533f2d393e0e..abbbc0f59bdca7d8055d1d8b43d000cf0360e9db 100644 (file)
@@ -66,14 +66,14 @@ void
 PB_DS_CLASS_C_DEC::
 assert_iterators() const
 {
-  map_debug_base::check_size(m_size);
+  debug_base::check_size(m_size);
   size_type iterated_num = 0;
   const_iterator prev_it = end();
   _GLIBCXX_DEBUG_ASSERT( m_end_it == m_a_values + m_size);
   for (const_iterator it = begin(); it != end(); ++it)
     {
       ++iterated_num;
-      _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(PB_DS_V2F(*it));)
+      _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(PB_DS_V2F(*it));)
       _GLIBCXX_DEBUG_ASSERT(lower_bound(PB_DS_V2F(*it)) == it);
       const_iterator upper_bound_it = upper_bound(PB_DS_V2F(*it));
       --upper_bound_it;
index 936d5492e8d1556b7fb3faeccf653276b131a307..18f9e1ce8456280c60a51e796306bc7ec6d5c03f 100644 (file)
@@ -61,7 +61,7 @@ clear()
       cond_dtor<size_type> cd(m_a_values, m_end_it, m_size);
     }
 
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::clear();)
+  _GLIBCXX_DEBUG_ONLY(debug_base::clear();)
   m_a_values = NULL;
   m_size = 0;
   m_end_it = m_a_values;
@@ -98,7 +98,7 @@ erase_if(Pred pred)
   value_vector a_new_values = s_value_alloc.allocate(new_size);
   iterator target_it = a_new_values;
   cond_dtor<size_type> cd(a_new_values, target_it, new_size);
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::clear());
+  _GLIBCXX_DEBUG_ONLY(debug_base::clear());
   for (source_it = begin(); source_it != m_end_it; ++source_it)
     {
       if (!pred(*source_it))
@@ -106,7 +106,7 @@ erase_if(Pred pred)
          new (const_cast<void*>(static_cast<const void* >(target_it)))
            value_type(*source_it);
 
-         _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(PB_DS_V2F(*source_it)));
+         _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(*source_it)));
          ++target_it;
         }
     }
index f9e2714431259ea82111872aa08aba50402a1932..78fdcf96c24b0803c47df1e2a14d08e1693a9a71 100644 (file)
@@ -49,7 +49,7 @@
 #include <ext/pb_ds/tree_policy.hpp>
 #include <ext/pb_ds/detail/eq_fn/eq_by_less.hpp>
 #include <ext/pb_ds/detail/types_traits.hpp>
-#include <ext/pb_ds/detail/map_debug_base.hpp>
+#include <ext/pb_ds/detail/debug_map_base.hpp>
 #include <ext/pb_ds/detail/type_utils.hpp>
 #include <ext/pb_ds/exception.hpp>
 #include <ext/pb_ds/detail/tree_trace_base.hpp>
@@ -89,8 +89,8 @@ namespace pb_ds
     types_traits<Key, Mapped, Allocator, false>
 
 #ifdef _GLIBCXX_DEBUG
-#define PB_DS_MAP_DEBUG_BASE_C_DEC \
-    map_debug_base<Key, eq_by_less<Key, Cmp_Fn>, \
+#define PB_DS_DEBUG_MAP_BASE_C_DEC \
+    debug_map_base<Key, eq_by_less<Key, Cmp_Fn>, \
                typename Allocator::template rebind<Key>::other::const_reference>
 #endif 
 
@@ -118,7 +118,7 @@ namespace pb_ds
             class Node_And_It_Traits, class Allocator>
     class PB_DS_OV_TREE_CLASS_NAME :
 #ifdef _GLIBCXX_DEBUG
-      protected PB_DS_MAP_DEBUG_BASE_C_DEC,
+      protected PB_DS_DEBUG_MAP_BASE_C_DEC,
 #endif 
 #ifdef PB_DS_TREE_TRACE
       public PB_DS_TREE_TRACE_BASE_C_DEC,
@@ -139,7 +139,7 @@ namespace pb_ds
       typedef Cmp_Fn cmp_fn_base;
 
 #ifdef _GLIBCXX_DEBUG
-      typedef PB_DS_MAP_DEBUG_BASE_C_DEC map_debug_base;
+      typedef PB_DS_DEBUG_MAP_BASE_C_DEC debug_base;
 #endif 
 
       typedef typename traits_base::pointer mapped_pointer_;
@@ -244,7 +244,7 @@ namespace pb_ds
        point_iterator it = lower_bound(r_key);
        if (it != end() && !Cmp_Fn::operator()(r_key, PB_DS_V2F(*it)))
          {
-           _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key));
+           _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
            _GLIBCXX_DEBUG_ONLY(assert_valid();)
             return it->second;
          }
@@ -267,7 +267,7 @@ namespace pb_ds
        if (it != end()&&  !Cmp_Fn::operator()(r_key, PB_DS_V2F(*it)))
          {
            _GLIBCXX_DEBUG_ONLY(assert_valid();)
-           _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key));
+           _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
            return std::make_pair(it, false);
          }
 
@@ -301,11 +301,11 @@ namespace pb_ds
        iterator pot_it = lower_bound(r_key);
        if (pot_it != end()&&  !Cmp_Fn::operator()(r_key, PB_DS_V2F(*pot_it)))
          {
-           _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key));
+           _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
            return ++pot_it;
          }
 
-       _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key));
+       _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key));
        return pot_it;
       }
 
@@ -320,11 +320,11 @@ namespace pb_ds
        iterator pot_it = lower_bound(r_key);
        if (pot_it != end() && !Cmp_Fn::operator()(r_key, PB_DS_V2F(*pot_it)))
          {
-           _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key));
+           _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
            return pot_it;
          }
 
-       _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key));
+       _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key));
        return end();
       }
 
@@ -423,7 +423,7 @@ namespace pb_ds
          typename Allocator::group_throw_prob_adjustor adjust(m_size);
 #endif 
 
-       _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(PB_DS_V2F(r_value)));
+       _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(PB_DS_V2F(r_value)));
 
        value_vector a_values = s_value_alloc.allocate(m_size + 1);
 
@@ -461,7 +461,7 @@ namespace pb_ds
        ++m_size;
        m_a_values = a_values;
        m_end_it = m_a_values + m_size;
-       _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(PB_DS_V2F(r_value)));
+       _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_value)));
        update(node_begin(), (node_update* )this);
        _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
        return ret_it;
@@ -514,7 +514,7 @@ namespace pb_ds
 #undef PB_DS_CLASS_T_DEC
 #undef PB_DS_OV_TREE_CLASS_NAME
 #undef PB_DS_TYPES_TRAITS_C_DEC
-#undef PB_DS_MAP_DEBUG_BASE_C_DEC
+#undef PB_DS_DEBUG_MAP_BASE_C_DEC
 #ifdef PB_DS_TREE_TRACE
 #undef PB_DS_TREE_TRACE_BASE_C_DEC
 #endif 
index 3b6abcd6c7730db00d7b3acf77fbd4599e920201..9528c412510ef13b019b1416a253f66210d7ed67 100644 (file)
@@ -83,7 +83,7 @@ split(const_key_reference r_key, PB_DS_CLASS_C_DEC& other)
       return;
     }
 
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::join(other);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::join(other);)
   iterator it = upper_bound(r_key);
   PB_DS_CLASS_C_DEC new_other(other, other);
   new_other.copy_from_ordered_range(it, end());
@@ -91,7 +91,7 @@ split(const_key_reference r_key, PB_DS_CLASS_C_DEC& other)
   new_this.copy_from_ordered_range(begin(), it);
 
   // No exceptions from this point.
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::split(r_key,(Cmp_Fn& )(*this), other);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::split(r_key,(Cmp_Fn& )(*this), other);)
   other.update(other.node_begin(), (node_update* )(&other));
   update(node_begin(), (node_update* )this);
   other.value_swap(new_other);
@@ -135,7 +135,7 @@ join(PB_DS_CLASS_C_DEC& other)
                                     begin(), end());
 
   // No exceptions from this point.
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::join(other);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::join(other);)
   value_swap(new_this);
   other.clear();
   _GLIBCXX_DEBUG_ONLY(assert_valid();)
index a5a96a5a389379ea39ec2b5bc7690653dc74637a..efa2e6104e515ae3747f745a95e5d19db5af6591 100644 (file)
@@ -81,7 +81,7 @@ PB_DS_CLASS_T_DEC
 PB_DS_CLASS_C_DEC::
 PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
 #ifdef _GLIBCXX_DEBUG
-  map_debug_base(other),
+  debug_base(other),
 #endif 
   synth_e_access_traits(other),
   node_update(other),
@@ -130,7 +130,7 @@ void
 PB_DS_CLASS_C_DEC::
 value_swap(PB_DS_CLASS_C_DEC& other)
 {
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::swap(other);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::swap(other);)
   std::swap(m_p_head, other.m_p_head);
   std::swap(m_size, other.m_size);
 }
index a2253a6a5027df4680d26352336462727688b5eb..d0cef7a3a6e986d17339b74f95a16fcafcf81aef 100644 (file)
@@ -77,7 +77,7 @@ assert_iterators() const
   for (const_iterator it = begin(); it != end(); ++it)
     {
       ++calc_size;
-      map_debug_base::check_key_exists(PB_DS_V2F(*it));
+      debug_base::check_key_exists(PB_DS_V2F(*it));
       _GLIBCXX_DEBUG_ASSERT(lower_bound(PB_DS_V2F(*it)) == it);
       _GLIBCXX_DEBUG_ASSERT(--upper_bound(PB_DS_V2F(*it)) == it);
     }
index 0fba3a4e2859d512773c258abc22308ad4e68280..42bb032701d11afa37a08e50a5676dc1710377cf 100644 (file)
@@ -52,18 +52,18 @@ erase(const_key_reference r_key)
   node_pointer p_nd = find_imp(r_key);
   if (p_nd == NULL || p_nd->m_type == pat_trie_internal_node_type)
     {
-      _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key));
+      _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key));
       return false;
     }
 
   _GLIBCXX_DEBUG_ASSERT(p_nd->m_type == pat_trie_leaf_node_type);
   if (!synth_e_access_traits::equal_keys(PB_DS_V2F(reinterpret_cast<leaf_pointer>(p_nd)->value()), r_key))
     {
-      _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key));
+      _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key));
       return false;
     }
 
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key));
+  _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
   erase_leaf(static_cast<leaf_pointer>(p_nd));
   _GLIBCXX_DEBUG_ONLY(assert_valid();)
   return true;
@@ -141,7 +141,7 @@ clear()
   clear_imp(m_p_head->m_p_parent);
   m_size = 0;
   initialize();
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::clear();)
+  _GLIBCXX_DEBUG_ONLY(debug_base::clear();)
   _GLIBCXX_DEBUG_ONLY(assert_valid();)
 }
 
index d9b3c4a941873b742e2fb6a90f79b8ca1415f611..7a925e6a02b4484cfc3d551b26cd66aed31678c1 100644 (file)
@@ -54,17 +54,17 @@ find(const_key_reference r_key)
 
   if (p_nd == NULL || p_nd->m_type != pat_trie_leaf_node_type)
     {
-      _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+      _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
       return end();
     }
 
   if (synth_e_access_traits::equal_keys(PB_DS_V2F(static_cast<leaf_pointer>(p_nd)->value()), r_key))
     {
-      _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key));
+      _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
       return iterator(p_nd);
     }
 
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
   return end();
 }
 
@@ -79,17 +79,17 @@ find(const_key_reference r_key) const
 
   if (p_nd == NULL || p_nd->m_type != pat_trie_leaf_node_type)
     {
-      _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+      _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
       return end();
     }
 
   if (synth_e_access_traits::equal_keys(PB_DS_V2F(static_cast<const_leaf_pointer>(p_nd)->value()), r_key))
     {
-      _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key));
+      _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
       return const_iterator(const_cast<node_pointer>(p_nd));
     }
 
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
   return end();
 }
 
index 4916ae34ff68a821c60466b8e8b0238607c4c1b5..ff4dd601038f7978146d29aef2ca3be3681a4b23 100644 (file)
@@ -98,7 +98,7 @@ join_prep(PB_DS_CLASS_C_DEC& other, split_join_branch_bag& r_bag)
     __throw_join_error();
 
   rec_join_prep(m_p_head->m_p_parent, other.m_p_head->m_p_parent, r_bag);
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::join(other);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::join(other);)
   return true;
 }
 
@@ -387,12 +387,12 @@ insert(const_reference r_val)
   if (p_lf != NULL && p_lf->m_type == pat_trie_leaf_node_type && 
       synth_e_access_traits::equal_keys(PB_DS_V2F(static_cast<leaf_pointer>(p_lf)->value()), PB_DS_V2F(r_val)))
     {
-      _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(PB_DS_V2F(r_val)));
+      _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(PB_DS_V2F(r_val)));
       _GLIBCXX_DEBUG_ONLY(assert_valid();)
       return std::make_pair(iterator(p_lf), false);
     }
 
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(PB_DS_V2F(r_val)));
+  _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(PB_DS_V2F(r_val)));
 
   leaf_pointer p_new_lf = s_leaf_allocator.allocate(1);
   cond_dealtor cond(p_new_lf);
@@ -407,7 +407,7 @@ insert(const_reference r_val)
   cond.set_no_action_dtor();
   ++m_size;
   update_min_max_for_inserted_leaf(p_new_lf);
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(PB_DS_V2F(r_val));)   
+  _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)   
   _GLIBCXX_DEBUG_ONLY(assert_valid();)
   return std::make_pair(point_iterator(p_new_lf), true);
 }
index 18c1a79414e0ea4c9d8eff9c4a51a816b0352110..386f91557dbe7a063fe668194f9d4279149ca461 100644 (file)
@@ -67,7 +67,7 @@
 #include <assert.h>
 #include <list>
 #ifdef _GLIBCXX_DEBUG
-#include <ext/pb_ds/detail/map_debug_base.hpp>
+#include <ext/pb_ds/detail/debug_map_base.hpp>
 #endif 
 #include <debug/debug.h>
 
@@ -94,8 +94,8 @@ namespace pb_ds
     types_traits<Key, Mapped, Allocator, false>
 
 #ifdef _GLIBCXX_DEBUG
-#define PB_DS_MAP_DEBUG_BASE_C_DEC \
-    map_debug_base<Key,        eq_by_less<Key, \
+#define PB_DS_DEBUG_MAP_BASE_C_DEC \
+    debug_map_base<Key,        eq_by_less<Key, \
                        std::less<Key> >, typename Allocator::template rebind<Key>::other::const_reference>
 #endif 
 
@@ -120,7 +120,7 @@ namespace pb_ds
             typename Allocator>
     class PB_DS_CLASS_NAME :
 #ifdef _GLIBCXX_DEBUG
-      public PB_DS_MAP_DEBUG_BASE_C_DEC,
+      public PB_DS_DEBUG_MAP_BASE_C_DEC,
 #endif 
       public Node_And_It_Traits::synth_e_access_traits,
       public Node_And_It_Traits::node_update,
@@ -155,7 +155,7 @@ namespace pb_ds
 #include <ext/pb_ds/detail/pat_trie_/cond_dtor_entry_dealtor.hpp>
 
 #ifdef _GLIBCXX_DEBUG
-      typedef PB_DS_MAP_DEBUG_BASE_C_DEC map_debug_base;
+      typedef PB_DS_DEBUG_MAP_BASE_C_DEC debug_base;
 #endif 
 
 #include <ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp>
@@ -512,7 +512,7 @@ namespace pb_ds
 #undef PB_DS_CLASS_T_DEC
 #undef PB_DS_CLASS_NAME
 #undef PB_DS_TYPES_TRAITS_C_DEC
-#undef PB_DS_MAP_DEBUG_BASE_C_DEC
+#undef PB_DS_DEBUG_MAP_BASE_C_DEC
 #undef PB_DS_V2F
 #undef PB_DS_EP2VP
 #undef PB_DS_V2S
index 63553ec92a4bae1601509c5977d1d3621bf0f65f..a119a5e8f162551aa6c19ef412330f5008e92dfc 100644 (file)
@@ -90,7 +90,7 @@ clear()
   clear_imp(m_p_head->m_p_parent);
   m_size = 0;
   initialize();
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::clear();)
+  _GLIBCXX_DEBUG_ONLY(debug_base::clear();)
   _GLIBCXX_DEBUG_ONLY(assert_valid(true, true);)
 }
 
index ed5d890f6f2c94fea2faeda0dad61b290e53cf55..efe9649825703853733145e9f48f5afd7d398013 100644 (file)
@@ -128,7 +128,7 @@ split_prep(const_key_reference r_key, PB_DS_CLASS_C_DEC& other, split_join_branc
       r_bag.add_branch();
       p_nd = p_nd->m_p_parent;
     }
-  _GLIBCXX_DEBUG_ONLY(map_debug_base::split(r_key,(synth_e_access_traits& )(*this), other);)
+  _GLIBCXX_DEBUG_ONLY(debug_base::split(r_key,(synth_e_access_traits& )(*this), other);)
 
   return (p_ret_l);
 }
index 9c6737515cbde95ac47119ff246ea0e8b29fc5e7..8be9245110ae01c8328d7bca6bee5cd6d046652d 100644 (file)
@@ -175,7 +175,7 @@ notify_externally_resized(size_type new_size)
 {
   m_resize_needed = false;
   size_type new_grow_size = size_type(m_load_max * new_size - 1);
-  size_type new_shrink_size = size_type(m_load_min * new_size );
+  size_type new_shrink_size = size_type(m_load_min * new_size);
   if (new_grow_size >= m_next_grow_size)
     {
       _GLIBCXX_DEBUG_ASSERT(new_shrink_size > m_next_shrink_size);
index 8272c8a71a4c40ebfeff66e6941fb943e08fadb6..089ca062f278e24d4d2ed35710b9beffd2d7d54c 100644 (file)
@@ -74,10 +74,13 @@ namespace pb_ds
       typedef typename Alloc::size_type size_type;
 
       // Extra value (used when the extra value is stored with each value).
-      typedef std::pair<size_type, size_type> comp_hash;
+      typedef std::pair<size_type, size_type>  comp_hash;
 
-      integral_constant<int, Store_Extra> m_store_extra_indicator;
-      typename no_throw_copies<Key, Mapped>::indicator m_no_throw_copies_indicator;
+      typedef integral_constant<int, Store_Extra> store_extra;
+      store_extra      m_store_extra_indicator;
+
+      typedef typename no_throw_copies<Key, Mapped>::indicator no_throw_copies;
+      no_throw_copies  m_no_throw_copies_indicator;
     };
   } // namespace detail
 } // namespace pb_ds
index 94039af0d80c182687989dc07eaf0963e8885576..74181b1fb9ee0fad6f4881ba814696d24c186e93 100644 (file)
 
 #include <ext/pb_ds/detail/type_utils.hpp>
 
+/**
+ * @namespace pb_ds
+ * @brief GNU extension policy-based data structures for public use.
+ */
+
 namespace pb_ds
 {
   // A trivial iterator tag. Signifies that the iterators has none of