2006-09-30 Benjamin Kosnik * include/ext/pb_ds/detail/types_traits.hpp (store_extra_false_type): To false_type. (store_extra_true_type): To true_type. (no_throw_copies_true_type): To true_type. (no_throw_copies_false_type): To false_type. * include/ext/pb_ds/detail/cc_hash_table_map_/ insert_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ insert_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ entry_list_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ debug_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ debug_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ insert_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ insert_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ find_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ debug_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ debug_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_no_store_hash_fn_imps.hpp: Same. * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp: Same. Index: include/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp =================================================================== --- include/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp (revision 117328) +++ include/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp (working copy) @@ -48,7 +48,7 @@ PB_DS_CLASS_T_DEC inline std::pair PB_DS_CLASS_C_DEC:: -insert_imp(const_reference r_val, store_hash_false_type) +insert_imp(const_reference r_val, false_type) { _GLIBCXX_DEBUG_ONLY(assert_valid();) const_key_reference r_key = PB_DS_V2F(r_val); Index: include/ext/pb_ds/detail/cc_hash_table_map_/resize_store_hash_fn_imps.hpp =================================================================== --- include/ext/pb_ds/detail/cc_hash_table_map_/resize_store_hash_fn_imps.hpp (revision 117328) +++ include/ext/pb_ds/detail/cc_hash_table_map_/resize_store_hash_fn_imps.hpp (working copy) @@ -48,7 +48,7 @@ PB_DS_CLASS_T_DEC inline typename PB_DS_CLASS_C_DEC::entry_pointer PB_DS_CLASS_C_DEC:: -resize_imp_no_exceptions_reassign_pointer(entry_pointer p_e, entry_pointer_array a_p_entries_resized, store_hash_true_type) +resize_imp_no_exceptions_reassign_pointer(entry_pointer p_e, entry_pointer_array a_p_entries_resized, true_type) { const comp_hash pos_hash_pair = ranged_hash_fn_base::operator()(PB_DS_V2F(p_e->m_value), p_e->m_hash); Index: include/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp =================================================================== --- include/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp (revision 117328) +++ include/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp (working copy) @@ -48,7 +48,7 @@ PB_DS_CLASS_T_DEC inline std::pair PB_DS_CLASS_C_DEC:: -insert_imp(const_reference r_val, store_hash_true_type) +insert_imp(const_reference r_val, true_type) { _GLIBCXX_DEBUG_ONLY(assert_valid();) const_key_reference key = PB_DS_V2F(r_val); Index: include/ext/pb_ds/detail/cc_hash_table_map_/entry_list_fn_imps.hpp =================================================================== --- include/ext/pb_ds/detail/cc_hash_table_map_/entry_list_fn_imps.hpp (revision 117328) +++ include/ext/pb_ds/detail/cc_hash_table_map_/entry_list_fn_imps.hpp (working copy) @@ -60,7 +60,7 @@ PB_DS_CLASS_T_DEC inline typename PB_DS_CLASS_C_DEC::entry_pointer PB_DS_CLASS_C_DEC:: -get_entry(const_reference r_val, no_throw_copies_true_type) +get_entry(const_reference r_val, true_type) { // Following line might throw an exception. entry_pointer p_e = s_entry_allocator.allocate(1); @@ -73,7 +73,7 @@ PB_DS_CLASS_T_DEC inline typename PB_DS_CLASS_C_DEC::entry_pointer PB_DS_CLASS_C_DEC:: -get_entry(const_reference r_val, no_throw_copies_false_type) +get_entry(const_reference r_val, false_type) { // Following line might throw an exception. entry_pointer p_e = s_entry_allocator.allocate(1); Index: include/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp =================================================================== --- include/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp (revision 117328) +++ include/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp (working copy) @@ -49,7 +49,7 @@ PB_DS_CLASS_T_DEC void PB_DS_CLASS_C_DEC:: -assert_entry_pointer_valid(const entry_pointer p, store_hash_false_type) const +assert_entry_pointer_valid(const entry_pointer p, false_type) const { map_debug_base::check_key_exists(PB_DS_V2F(p->m_value)); } #endif Index: include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp =================================================================== --- include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp (revision 117328) +++ include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp (working copy) @@ -136,10 +136,6 @@ typedef typename traits_base::const_pointer const_pointer_; typedef typename traits_base::reference reference_; typedef typename traits_base::const_reference const_reference_; - typedef typename traits_base::store_extra_false_type store_hash_false_type; - typedef typename traits_base::store_extra_true_type store_hash_true_type; - typedef typename traits_base::no_throw_copies_false_type no_throw_copies_false_type; - typedef typename traits_base::no_throw_copies_true_type no_throw_copies_true_type; struct entry : public traits_base::stored_value_type { @@ -362,26 +358,26 @@ resize_imp_no_exceptions(size_type, entry_pointer_array, size_type); inline entry_pointer - resize_imp_no_exceptions_reassign_pointer(entry_pointer, entry_pointer_array, store_hash_false_type); + resize_imp_no_exceptions_reassign_pointer(entry_pointer, entry_pointer_array, false_type); inline entry_pointer - resize_imp_no_exceptions_reassign_pointer(entry_pointer, entry_pointer_array, store_hash_true_type); + resize_imp_no_exceptions_reassign_pointer(entry_pointer, entry_pointer_array, true_type); void deallocate_links_in_list(entry_pointer); inline entry_pointer - get_entry(const_reference, no_throw_copies_false_type); + get_entry(const_reference, false_type); inline entry_pointer - get_entry(const_reference, no_throw_copies_true_type); + get_entry(const_reference, true_type); inline void rels_entry(entry_pointer); #ifdef PB_DS_DATA_TRUE_INDICATOR inline mapped_reference - subscript_imp(const_key_reference r_key, store_hash_false_type) + subscript_imp(const_key_reference r_key, false_type) { _GLIBCXX_DEBUG_ONLY(assert_valid();) const size_type pos = ranged_hash_fn_base::operator()(r_key); @@ -407,7 +403,7 @@ } inline mapped_reference - subscript_imp(const_key_reference r_key, store_hash_true_type) + subscript_imp(const_key_reference r_key, true_type) { _GLIBCXX_DEBUG_ONLY(assert_valid();) comp_hash pos_hash_pair = ranged_hash_fn_base::operator()(r_key); @@ -434,10 +430,10 @@ #endif inline std::pair - insert_imp(const_reference, store_hash_false_type); + insert_imp(const_reference, false_type); inline std::pair - insert_imp(const_reference, store_hash_true_type); + insert_imp(const_reference, true_type); inline pointer insert_new_imp(const_reference r_val, size_type pos) @@ -478,7 +474,7 @@ } inline pointer - find_key_pointer(const_key_reference r_key, store_hash_false_type) + find_key_pointer(const_key_reference r_key, false_type) { entry_pointer p_e = m_entries[ranged_hash_fn_base::operator()(r_key)]; resize_base::notify_find_search_start(); @@ -501,7 +497,7 @@ } inline pointer - find_key_pointer(const_key_reference r_key, store_hash_true_type) + find_key_pointer(const_key_reference r_key, true_type) { comp_hash pos_hash_pair = ranged_hash_fn_base::operator()(r_key); entry_pointer p_e = m_entries[pos_hash_pair.first]; @@ -585,17 +581,15 @@ assert_entry_pointer_array_valid(const entry_pointer_array) const; void - assert_entry_pointer_valid(const entry_pointer, - store_hash_true_type) const; + assert_entry_pointer_valid(const entry_pointer, true_type) const; void - assert_entry_pointer_valid(const entry_pointer, - store_hash_false_type) const; + assert_entry_pointer_valid(const entry_pointer, false_type) const; #endif #ifdef PB_DS_HT_MAP_TRACE_ void - trace_list(const_entry_pointer p_l) const; + trace_list(const_entry_pointer) const; #endif private: Index: include/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp =================================================================== --- include/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp (revision 117328) +++ include/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp (working copy) @@ -49,7 +49,7 @@ PB_DS_CLASS_T_DEC void PB_DS_CLASS_C_DEC:: -assert_entry_pointer_valid(const entry_pointer p_e, store_hash_true_type) const +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)); comp_hash pos_hash_pair = ranged_hash_fn_base::operator()(PB_DS_V2F(p_e->m_value)); Index: include/ext/pb_ds/detail/cc_hash_table_map_/resize_no_store_hash_fn_imps.hpp =================================================================== --- include/ext/pb_ds/detail/cc_hash_table_map_/resize_no_store_hash_fn_imps.hpp (revision 117328) +++ include/ext/pb_ds/detail/cc_hash_table_map_/resize_no_store_hash_fn_imps.hpp (working copy) @@ -48,7 +48,7 @@ PB_DS_CLASS_T_DEC inline typename PB_DS_CLASS_C_DEC::entry_pointer PB_DS_CLASS_C_DEC:: -resize_imp_no_exceptions_reassign_pointer(entry_pointer p_e, entry_pointer_array a_p_entries_resized, store_hash_false_type) +resize_imp_no_exceptions_reassign_pointer(entry_pointer p_e, entry_pointer_array a_p_entries_resized, false_type) { const size_type hash_pos = ranged_hash_fn_base::operator()(PB_DS_V2F(p_e->m_value)); Index: include/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp =================================================================== --- include/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp (revision 117328) +++ include/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp (working copy) @@ -48,7 +48,7 @@ PB_DS_CLASS_T_DEC inline typename PB_DS_CLASS_C_DEC::size_type PB_DS_CLASS_C_DEC:: -find_ins_pos(const_key_reference r_key, store_hash_false_type) +find_ins_pos(const_key_reference r_key, false_type) { size_type hash = ranged_probe_fn_base::operator()(r_key); size_type i; @@ -99,7 +99,7 @@ PB_DS_CLASS_T_DEC inline std::pair PB_DS_CLASS_C_DEC:: -insert_imp(const_reference r_val, store_hash_false_type) +insert_imp(const_reference r_val, false_type) { const_key_reference r_key = PB_DS_V2F(r_val); const size_type pos = find_ins_pos(r_key, Index: include/ext/pb_ds/detail/gp_hash_table_map_/resize_store_hash_fn_imps.hpp =================================================================== --- include/ext/pb_ds/detail/gp_hash_table_map_/resize_store_hash_fn_imps.hpp (revision 117328) +++ include/ext/pb_ds/detail/gp_hash_table_map_/resize_store_hash_fn_imps.hpp (working copy) @@ -49,7 +49,7 @@ inline void PB_DS_CLASS_C_DEC:: resize_imp_reassign(entry_pointer p_e, entry_array a_entries_resized, - store_hash_true_type) + true_type) { const_key_reference r_key = PB_DS_V2F(p_e->m_value); size_type hash = ranged_probe_fn_base::operator()(r_key, p_e->m_hash); Index: include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp =================================================================== --- include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp (revision 117328) +++ include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp (working copy) @@ -127,8 +127,6 @@ { private: typedef PB_DS_TYPES_TRAITS_C_DEC traits_base; - typedef typename traits_base::store_extra_false_type store_hash_false_type; - typedef typename traits_base::store_extra_true_type store_hash_true_type; typedef typename traits_base::value_type value_type_; typedef typename traits_base::pointer pointer_; typedef typename traits_base::const_pointer const_pointer_; @@ -383,22 +381,22 @@ resize_imp(entry_array, size_type); inline void - resize_imp_reassign(entry_pointer, entry_array, store_hash_false_type); + resize_imp_reassign(entry_pointer, entry_array, false_type); inline void - resize_imp_reassign(entry_pointer, entry_array, store_hash_true_type); + resize_imp_reassign(entry_pointer, entry_array, true_type); inline size_type - find_ins_pos(const_key_reference, store_hash_false_type); + find_ins_pos(const_key_reference, false_type); inline comp_hash - find_ins_pos(const_key_reference, store_hash_true_type); + find_ins_pos(const_key_reference, true_type); inline std::pair - insert_imp(const_reference, store_hash_false_type); + insert_imp(const_reference, false_type); inline std::pair - insert_imp(const_reference, store_hash_true_type); + insert_imp(const_reference, true_type); inline pointer insert_new_imp(const_reference r_val, size_type pos) @@ -450,7 +448,7 @@ #ifdef PB_DS_DATA_TRUE_INDICATOR inline mapped_reference - subscript_imp(const_key_reference key, store_hash_false_type) + subscript_imp(const_key_reference key, false_type) { _GLIBCXX_DEBUG_ONLY(assert_valid();) @@ -466,7 +464,7 @@ } inline mapped_reference - subscript_imp(const_key_reference key, store_hash_true_type) + subscript_imp(const_key_reference key, true_type) { _GLIBCXX_DEBUG_ONLY(assert_valid();) @@ -483,7 +481,7 @@ #endif inline pointer - find_key_pointer(const_key_reference key, store_hash_false_type) + find_key_pointer(const_key_reference key, false_type) { const size_type hash = ranged_probe_fn_base::operator()(key); size_type i; @@ -529,7 +527,7 @@ } inline pointer - find_key_pointer(const_key_reference key, store_hash_true_type) + find_key_pointer(const_key_reference key, true_type) { comp_hash pos_hash_pair = ranged_probe_fn_base::operator()(key); size_type i; @@ -640,10 +638,10 @@ #ifdef _GLIBCXX_DEBUG void - assert_entry_array_valid(const entry_array, store_hash_false_type) const; + assert_entry_array_valid(const entry_array, false_type) const; void - assert_entry_array_valid(const entry_array, store_hash_true_type) const; + assert_entry_array_valid(const entry_array, true_type) const; #endif static entry_allocator s_entry_allocator; Index: include/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp =================================================================== --- include/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp (revision 117328) +++ include/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp (working copy) @@ -48,7 +48,7 @@ PB_DS_CLASS_T_DEC inline typename PB_DS_CLASS_C_DEC::comp_hash PB_DS_CLASS_C_DEC:: -find_ins_pos(const_key_reference r_key, store_hash_true_type) +find_ins_pos(const_key_reference r_key, true_type) { _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();) comp_hash pos_hash_pair = ranged_probe_fn_base::operator()(r_key); @@ -104,7 +104,7 @@ PB_DS_CLASS_T_DEC inline std::pair PB_DS_CLASS_C_DEC:: -insert_imp(const_reference r_val, store_hash_true_type) +insert_imp(const_reference r_val, true_type) { const_key_reference r_key = PB_DS_V2F(r_val); comp_hash pos_hash_pair = find_ins_pos(r_key, Index: include/ext/pb_ds/detail/gp_hash_table_map_/find_no_store_hash_fn_imps.hpp =================================================================== --- include/ext/pb_ds/detail/gp_hash_table_map_/find_no_store_hash_fn_imps.hpp (revision 117328) +++ include/ext/pb_ds/detail/gp_hash_table_map_/find_no_store_hash_fn_imps.hpp (working copy) @@ -48,5 +48,5 @@ PB_DS_CLASS_T_DEC inline typename PB_DS_CLASS_C_DEC::pointer PB_DS_CLASS_C_DEC:: -find_key_pointer(const_key_reference r_key, store_hash_false_type) +find_key_pointer(const_key_reference r_key, false_type) Index: include/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp =================================================================== --- include/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp (revision 117328) +++ include/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp (working copy) @@ -49,7 +49,7 @@ PB_DS_CLASS_T_DEC void PB_DS_CLASS_C_DEC:: -assert_entry_array_valid(const entry_array a_entries, store_hash_false_type) const +assert_entry_array_valid(const entry_array a_entries, false_type) const { size_type iterated_num_used_e = 0; for (size_type pos = 0; pos < m_num_e; ++pos) Index: include/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp =================================================================== --- include/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp (revision 117328) +++ include/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp (working copy) @@ -49,7 +49,7 @@ PB_DS_CLASS_T_DEC void PB_DS_CLASS_C_DEC:: -assert_entry_array_valid(const entry_array a_entries, store_hash_true_type) const +assert_entry_array_valid(const entry_array a_entries, true_type) const { size_type iterated_num_used_e = 0; Index: include/ext/pb_ds/detail/gp_hash_table_map_/resize_no_store_hash_fn_imps.hpp =================================================================== --- include/ext/pb_ds/detail/gp_hash_table_map_/resize_no_store_hash_fn_imps.hpp (revision 117328) +++ include/ext/pb_ds/detail/gp_hash_table_map_/resize_no_store_hash_fn_imps.hpp (working copy) @@ -49,7 +49,7 @@ inline void PB_DS_CLASS_C_DEC:: resize_imp_reassign(entry_pointer p_e, entry_array a_entries_resized, - store_hash_false_type) + false_type) { const_key_reference r_key = PB_DS_V2F(p_e->m_value); size_type hash = ranged_probe_fn_base::operator()(r_key); Index: include/ext/pb_ds/detail/types_traits.hpp =================================================================== --- include/ext/pb_ds/detail/types_traits.hpp (revision 117328) +++ include/ext/pb_ds/detail/types_traits.hpp (working copy) @@ -73,10 +73,6 @@ typedef typename key_allocator::reference key_reference; typedef typename key_allocator::const_reference const_key_reference; typedef typename Alloc::size_type size_type; - typedef false_type store_extra_false_type; - typedef true_type store_extra_true_type; - typedef false_type no_throw_copies_false_type; - typedef true_type no_throw_copies_true_type; integral_constant m_store_extra_indicator; typename no_throw_copies::indicator m_no_throw_copies_indicator; @@ -84,8 +80,7 @@ // Extra value (used when the extra value is stored with each value). typedef typename comp_hash_::comp_hash comp_hash; }; - } // namespace detail } // namespace pb_ds -#endif // #ifndef PB_DS_TYPES_TRAITS_HPP +#endif Index: include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp =================================================================== --- include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp (revision 117328) +++ include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp (working copy) @@ -63,7 +63,6 @@ { namespace detail { - #define PB_DS_CLASS_T_DEC \ template @@ -152,10 +151,6 @@ typedef PB_DS_MAP_DEBUG_BASE_C_DEC map_debug_base; #endif - typedef typename traits_base:: no_throw_copies_false_type no_throw_copies_false_type; - - typedef typename traits_base:: no_throw_copies_true_type no_throw_copies_true_type; - typedef cond_dealtor cond_dealtor_t; public: