+2011-05-11 François Dumont <francois.cppdevs@free.fr>
+
+ * include/ext/pb_ds/detail/resize_policy/
+ hash_load_check_resize_trigger_imp.hpp (assert_valid): Replace
+ _GLIBCXX_DEBUG_ASSERT calls with PB_DS_DEBUG_VERIFY.
+ * include/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp,
+ find_fn_imps.hpp, insert_fn_imps.hpp, binomial_heap_base_.hpp,
+ constructors_destructor_fn_imps.hpp, split_join_fn_imps.hpp
+ (PB_DS_ASSERT_VALID): Rename in PB_DS_ASSERT_VALID_COND.
+ * include/ext/pb_ds/detail/debug_map_base.hpp,
+ splay_tree_/splay_tree_.hpp, ov_tree_map_/ov_tree_map_.hpp,
+ cc_hash_table_map_/cc_ht_map_.hpp, pat_trie_/pat_trie_.hpp,
+ leaf.hpp, internal_node.hpp, gp_hash_table_map_/gp_ht_map_.hpp,
+ bin_search_tree_/bin_search_tree_.hpp, list_update_map_/lu_map_.hpp,
+ rb_tree_map_/rb_tree_.hpp (PB_DS_ASSERT_VALID, PB_DS_DEBUG_VERIFY,
+ PB_DS_CHECK_KEY_EXISTS, PB_DS_CHECK_KEY_DOES_NOT_EXIST): Duplicate
+ macro definitions move...
+ * include/ext/pb_ds/detail/container_base_dispatch.hpp: ... here...
+ * include/ext/pb_ds/detail/basic_tree_policy/traits.hpp: ... and here.
+ * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp,
+ resize_policy.hpp, pairing_heap_/pairing_heap_.hpp,
+ left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp,
+ binomial_heap_/binomial_heap_.hpp, thin_heap_/thin_heap_.hpp,
+ rc_binomial_heap_/rc_binomial_heap_.hpp, rc.hpp (PB_DS_ASSERT_VALID,
+ PB_DS_DEBUG_VERIFY): Duplicate macro definitions move...
+ * include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp:
+ ...here.
+
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
#ifndef PB_DS_NODE_AND_IT_TRAITS_HPP
#define PB_DS_NODE_AND_IT_TRAITS_HPP
+#define PB_DS_DEBUG_VERIFY(_Cond) \
+ _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
+ _M_message(#_Cond" assertion from %1;:%2;") \
+ ._M_string(__FILE__)._M_integer(__LINE__) \
+ ,__file,__line)
+
#include <ext/pb_ds/detail/types_traits.hpp>
#include <ext/pb_ds/detail/bin_search_tree_/traits.hpp>
#include <ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp>
#include <ext/pb_ds/detail/splay_tree_/traits.hpp>
#include <ext/pb_ds/detail/ov_tree_map_/traits.hpp>
#include <ext/pb_ds/detail/pat_trie_/traits.hpp>
+#undef PB_DS_DEBUG_VERIFY
#endif // #ifndef PB_DS_NODE_AND_IT_TRAITS_HPP
static node_allocator s_node_allocator;
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
#define PB_DS_STRUCT_ONLY_ASSERT_VALID(X) \
_GLIBCXX_DEBUG_ONLY(X.structure_only_assert_valid(__FILE__, __LINE__);)
#define PB_DS_ASSERT_NODE_CONSISTENT(_Node) \
_GLIBCXX_DEBUG_ONLY(assert_node_consistent(_Node, __FILE__, __LINE__);)
-#define PB_DS_CHECK_KEY_EXISTS(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(_Key, __FILE__, __LINE__);)
-
-#define PB_DS_CHECK_KEY_DOES_NOT_EXIST(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(_Key, \
- __FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/bin_search_tree_/iterators_fn_imps.hpp>
#include <ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp>
#include <ext/pb_ds/detail/bin_search_tree_/rotate_fn_imps.hpp>
#include <ext/pb_ds/detail/bin_search_tree_/policy_access_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_CHECK_KEY_DOES_NOT_EXIST
-#undef PB_DS_CHECK_KEY_EXISTS
#undef PB_DS_ASSERT_NODE_CONSISTENT
#undef PB_DS_STRUCT_ONLY_ASSERT_VALID
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_NAME
entry_pointer m_a_entries;
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp>
#include <ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/binary_heap_/iterators_fn_imps.hpp>
#include <ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp>
#include <ext/pb_ds/detail/binary_heap_/policy_access_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_ENTRY_CMP_DEC
#define PB_DS_CLASS_C_DEC resize_policy<Size_Type>
-#define PB_DS_ASSERT_VALID(X)\
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
template<typename Size_Type>
class resize_policy
{
}
#endif
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_C_DEC
#endif
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
#include <ext/pb_ds/detail/binomial_heap_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/binomial_heap_/debug_fn_imps.hpp>
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
node_pointer m_p_max;
};
-#define PB_DS_ASSERT_VALID(X, _StrictlyBinomial) \
+#define PB_DS_ASSERT_VALID_COND(X, _StrictlyBinomial) \
_GLIBCXX_DEBUG_ONLY(X.assert_valid(_StrictlyBinomial,__FILE__, __LINE__);)
#define PB_DS_ASSERT_BASE_NODE_CONSISTENT(_Node, _Bool) \
_GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(_Node, _Bool, \
__FILE__, __LINE__);)
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp>
#include <ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp>
#include <ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp>
#include <ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
#undef PB_DS_ASSERT_BASE_NODE_CONSISTENT
-#undef PB_DS_ASSERT_VALID
+#undef PB_DS_ASSERT_VALID_COND
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_BASE_C_DEC
while (first_it != last_it)
push(*(first_it++));
- PB_DS_ASSERT_VALID((*this),false)
+ PB_DS_ASSERT_VALID_COND((*this),false)
}
PB_DS_CLASS_T_DEC
binomial_heap_base_() :
m_p_max(0)
{
- PB_DS_ASSERT_VALID((*this),false)
+ PB_DS_ASSERT_VALID_COND((*this),false)
}
PB_DS_CLASS_T_DEC
PB_DS_BASE_C_DEC(r_cmp_fn),
m_p_max(0)
{
- PB_DS_ASSERT_VALID((*this),false)
+ PB_DS_ASSERT_VALID_COND((*this),false)
}
PB_DS_CLASS_T_DEC
PB_DS_BASE_C_DEC(other),
m_p_max(0)
{
- PB_DS_ASSERT_VALID((*this),false)
+ PB_DS_ASSERT_VALID_COND((*this),false)
}
PB_DS_CLASS_T_DEC
PB_DS_CLASS_C_DEC::
swap(PB_DS_CLASS_C_DEC& other)
{
- PB_DS_ASSERT_VALID((*this),false)
+ PB_DS_ASSERT_VALID_COND((*this),false)
base_type::swap(other);
std::swap(m_p_max, other.m_p_max);
- PB_DS_ASSERT_VALID((*this),false)
+ PB_DS_ASSERT_VALID_COND((*this),false)
}
PB_DS_CLASS_T_DEC
PB_DS_CLASS_C_DEC::
pop()
{
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
_GLIBCXX_DEBUG_ASSERT(!base_type::empty());
if (m_p_max == 0)
m_p_max = 0;
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
}
PB_DS_CLASS_T_DEC
PB_DS_CLASS_C_DEC::
erase(point_iterator it)
{
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
_GLIBCXX_DEBUG_ASSERT(!base_type::empty());
base_type::bubble_to_top(it.m_p_nd);
m_p_max = 0;
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
}
PB_DS_CLASS_T_DEC
PB_DS_CLASS_C_DEC::
erase_if(Pred pred)
{
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
if (base_type::empty())
{
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
return 0;
}
m_p_max = 0;
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
return ersd;
}
PB_DS_CLASS_C_DEC::
top() const
{
- PB_DS_ASSERT_VALID((*this),false)
+ PB_DS_ASSERT_VALID_COND((*this),false)
_GLIBCXX_DEBUG_ASSERT(!base_type::empty());
if (m_p_max == 0)
PB_DS_CLASS_C_DEC::
push(const_reference r_val)
{
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
node_pointer p_nd = base_type::get_new_node_for_insert(r_val);
m_p_max = 0;
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
return point_iterator(p_nd);
}
PB_DS_CLASS_C_DEC::
modify(point_iterator it, const_reference r_new_val)
{
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
node_pointer p_nd = it.m_p_nd;
_GLIBCXX_DEBUG_ASSERT(p_nd != 0);
m_p_max = 0;
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
return;
}
m_p_max = 0;
- PB_DS_ASSERT_VALID((*this),true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
}
PB_DS_CLASS_C_DEC::
split(Pred pred, PB_DS_CLASS_C_DEC& other)
{
- PB_DS_ASSERT_VALID((*this),true)
- PB_DS_ASSERT_VALID(other,true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
+ PB_DS_ASSERT_VALID_COND(other,true)
other.clear();
if (base_type::empty())
{
- PB_DS_ASSERT_VALID((*this),true)
- PB_DS_ASSERT_VALID(other,true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
+ PB_DS_ASSERT_VALID_COND(other,true)
return;
}
p_out = p_next;
}
- PB_DS_ASSERT_VALID(other,true)
+ PB_DS_ASSERT_VALID_COND(other,true)
node_pointer p_cur = base_type::m_p_root;
m_p_max = 0;
- PB_DS_ASSERT_VALID((*this),true)
- PB_DS_ASSERT_VALID(other,true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
+ PB_DS_ASSERT_VALID_COND(other,true)
}
PB_DS_CLASS_T_DEC
PB_DS_CLASS_C_DEC::
join(PB_DS_CLASS_C_DEC& other)
{
- PB_DS_ASSERT_VALID((*this),true)
- PB_DS_ASSERT_VALID(other,true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
+ PB_DS_ASSERT_VALID_COND(other,true)
node_pointer p_other = other.m_p_root;
other.m_size = 0;
other.m_p_max = 0;
- PB_DS_ASSERT_VALID((*this),true)
- PB_DS_ASSERT_VALID(other,true)
+ PB_DS_ASSERT_VALID_COND((*this),true)
+ PB_DS_ASSERT_VALID_COND(other,true)
}
PB_DS_CLASS_T_DEC
#define PB_DS_V2S(X) Mapped_Data()
#endif
-#define PB_DS_CHECK_KEY_EXISTS(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(_Key, __FILE__, __LINE__);)
-
-#define PB_DS_CHECK_KEY_DOES_NOT_EXIST(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(_Key, \
- __FILE__, __LINE__);)
-
-
// <011i$i0|\|-<|-|4i|\|i|\|g |-|4$|-| 74813.
template<typename Key,
typename Mapped,
PB_DS_STATIC_ASSERT(sth, store_hash_ok);
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/cc_hash_table_map_/entry_list_fn_imps.hpp>
#include <ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp>
#include <ext/pb_ds/detail/cc_hash_table_map_/insert_fn_imps.hpp>
#include <ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_ASSERT_VALID
-#undef PB_DS_CHECK_KEY_DOES_NOT_EXIST
-#undef PB_DS_CHECK_KEY_EXISTS
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_HASH_EQ_FN_C_DEC
#include <ext/typelist.h>
+#define PB_DS_ASSERT_VALID(X) \
+ _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
+
+#define PB_DS_DEBUG_VERIFY(_Cond) \
+ _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
+ _M_message(#_Cond" assertion from %1;:%2;") \
+ ._M_string(__FILE__)._M_integer(__LINE__) \
+ ,__file,__line)
+
+#define PB_DS_CHECK_KEY_EXISTS(_Key) \
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(_Key, __FILE__, __LINE__);)
+
+#define PB_DS_CHECK_KEY_DOES_NOT_EXIST(_Key) \
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(_Key, \
+ __FILE__, __LINE__);)
+
#define PB_DS_DATA_TRUE_INDICATOR
#include <ext/pb_ds/detail/list_update_map_/lu_map_.hpp>
#undef PB_DS_DATA_TRUE_INDICATOR
#include <ext/pb_ds/detail/pat_trie_/pat_trie_.hpp>
#undef PB_DS_DATA_FALSE_INDICATOR
+#undef PB_DS_CHECK_KEY_DOES_NOT_EXIST
+#undef PB_DS_CHECK_KEY_EXISTS
+#undef PB_DS_DEBUG_VERIFY
+#undef PB_DS_ASSERT_VALID
+
namespace __gnu_pbds
{
namespace detail
#include <ext/throw_allocator.h>
#include <debug/debug.h>
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
namespace __gnu_pbds
{
namespace detail
} // namespace detail
} // namespace __gnu_pbds
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_ASSERT_VALID
#endif
#define PB_DS_V2S(X) Mapped()
#endif
-#define PB_DS_CHECK_KEY_EXISTS(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(_Key, __FILE__, __LINE__);)
-
-#define PB_DS_CHECK_KEY_DOES_NOT_EXIST(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(_Key, \
- __FILE__, __LINE__);)
-
template<typename Key,
typename Mapped,
typename Hash_Fn,
PB_DS_STATIC_ASSERT(sth, store_hash_ok);
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp>
#include <ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp>
#include <ext/pb_ds/detail/gp_hash_table_map_/insert_fn_imps.hpp>
#include <ext/pb_ds/detail/gp_hash_table_map_/trace_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_ASSERT_VALID
-#undef PB_DS_CHECK_KEY_DOES_NOT_EXIST
-#undef PB_DS_CHECK_KEY_EXISTS
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_HASH_EQ_FN_C_DEC
static no_throw_copies_t s_no_throw_copies_ind;
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/left_child_next_sibling_heap_/iterators_fn_imps.hpp>
#include <ext/pb_ds/detail/left_child_next_sibling_heap_/debug_fn_imps.hpp>
#include <ext/pb_ds/detail/left_child_next_sibling_heap_/info_fn_imps.hpp>
#include <ext/pb_ds/detail/left_child_next_sibling_heap_/policy_access_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
mutable entry_pointer m_p_l;
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_CHECK_KEY_EXISTS(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(_Key, __FILE__, __LINE__);)
-
-#define PB_DS_CHECK_KEY_DOES_NOT_EXIST(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(_Key, \
- __FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp>
#include <ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp>
#include <ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp>
#include <ext/pb_ds/detail/list_update_map_/trace_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_CHECK_KEY_DOES_NOT_EXIST
-#undef PB_DS_CHECK_KEY_EXISTS
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_TYPES_TRAITS_C_DEC
Cmp_Fn, false, Allocator>
#endif
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_CHECK_KEY_EXISTS(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(_Key, __FILE__, __LINE__);)
-
-#define PB_DS_CHECK_KEY_DOES_NOT_EXIST(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(_Key, \
- __FILE__, __LINE__);)
+#ifndef PB_DS_CHECK_KEY_EXISTS
+# error Missing definition
+#endif
// Ordered-vector tree associative-container.
template<typename Key, typename Mapped, class Cmp_Fn,
size_type m_size;
};
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/ov_tree_map_/iterators_fn_imps.hpp>
#include <ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp>
#include <ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp>
#include <ext/pb_ds/detail/bin_search_tree_/policy_access_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_CHECK_KEY_DOES_NOT_EXIST
-#undef PB_DS_CHECK_KEY_EXISTS
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_OV_TREE_CLASS_NAME
remove_node(node_pointer p_nd);
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
#define PB_DS_ASSERT_NODE_CONSISTENT(_Node, _Bool) \
_GLIBCXX_DEBUG_ONLY(assert_node_consistent(_Node, _Bool, \
__FILE__, __LINE__);)
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/pairing_heap_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/pairing_heap_/debug_fn_imps.hpp>
#include <ext/pb_ds/detail/pairing_heap_/find_fn_imps.hpp>
#include <ext/pb_ds/detail/pairing_heap_/erase_fn_imps.hpp>
#include <ext/pb_ds/detail/pairing_heap_/split_join_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
#undef PB_DS_ASSERT_NODE_CONSISTENT
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_BASE_C_DEC
}
#ifdef _GLIBCXX_DEBUG
-# define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
PB_DS_CLASS_T_DEC
typename PB_DS_CLASS_C_DEC::subtree_debug_info
PB_DS_CLASS_C_DEC::
}
return std::make_pair(pref_b_it(), pref_e_it());
}
-# undef PB_DS_DEBUG_VERIFY
#endif
#undef PB_DS_CLASS_T_DEC
{ return m_value; }
#ifdef _GLIBCXX_DEBUG
-# define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
PB_DS_CLASS_T_DEC
typename PB_DS_CLASS_C_DEC::subtree_debug_info
PB_DS_CLASS_C_DEC::
PB_DS_CLASS_T_DEC
PB_DS_CLASS_C_DEC::
~pat_trie_leaf() { }
-# undef PB_DS_DEBUG_VERIFY
#endif
#undef PB_DS_CLASS_T_DEC
size_type m_size;
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
#define PB_DS_ASSERT_NODE_VALID(X) \
_GLIBCXX_DEBUG_ONLY(X->assert_valid(this, __FILE__, __LINE__);)
#define PB_DS_RECURSIVE_COUNT_LEAFS(X) \
recursive_count_leafs(X, __FILE__, __LINE__)
-#define PB_DS_CHECK_KEY_EXISTS(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(_Key, __FILE__, __LINE__);)
-
-#define PB_DS_CHECK_KEY_DOES_NOT_EXIST(_Key) \
- _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(_Key, \
- __FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/pat_trie_/iterators_fn_imps.hpp>
#include <ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp>
#include <ext/pb_ds/detail/pat_trie_/trace_fn_imps.hpp>
#include <ext/pb_ds/detail/pat_trie_/update_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_CHECK_KEY_DOES_NOT_EXIST
-#undef PB_DS_CHECK_KEY_EXISTS
#undef PB_DS_RECURSIVE_COUNT_LEAFS
#undef PB_DS_ASSERT_NODE_VALID
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_NAME
#ifndef PB_DS_PRIORITY_QUEUE_BASE_DS_DISPATCHER_HPP
#define PB_DS_PRIORITY_QUEUE_BASE_DS_DISPATCHER_HPP
+#define PB_DS_ASSERT_VALID(X) \
+ _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
+
+#define PB_DS_DEBUG_VERIFY(_Cond) \
+ _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
+ _M_message(#_Cond" assertion from %1;:%2;") \
+ ._M_string(__FILE__)._M_integer(__LINE__) \
+ ,__file,__line)
+
#include <ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp>
#include <ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp>
#include <ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp>
#include <ext/pb_ds/detail/binary_heap_/binary_heap_.hpp>
#include <ext/pb_ds/detail/thin_heap_/thin_heap_.hpp>
+#undef PB_DS_DEBUG_VERIFY
+#undef PB_DS_ASSERT_VALID
+
namespace __gnu_pbds
{
namespace detail
split_at_node(node_pointer, PB_DS_CLASS_C_DEC&);
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
#define PB_DS_STRUCT_ONLY_ASSERT_VALID(X) \
_GLIBCXX_DEBUG_ONLY(X.structure_only_assert_valid(__FILE__, __LINE__);)
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/rb_tree_map_/insert_fn_imps.hpp>
#include <ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp>
#include <ext/pb_ds/detail/rb_tree_map_/split_join_fn_imps.hpp>
#include <ext/pb_ds/detail/rb_tree_map_/info_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
#undef PB_DS_STRUCT_ONLY_ASSERT_VALID
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_NAME
#ifndef PB_DS_RC_HPP
#define PB_DS_RC_HPP
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
namespace __gnu_pbds
{
namespace detail
} // namespace detail
} // namespace __gnu_pbds
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_ASSERT_VALID
#endif
rc_t m_rc;
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/rc_binomial_heap_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/rc_binomial_heap_/debug_fn_imps.hpp>
#include <ext/pb_ds/detail/rc_binomial_heap_/erase_fn_imps.hpp>
#include <ext/pb_ds/detail/rc_binomial_heap_/insert_fn_imps.hpp>
#include <ext/pb_ds/detail/rc_binomial_heap_/split_join_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_BASE_C_DEC
PB_DS_CLASS_C_DEC::
assert_valid(const char* __file, int __line) const
{
- _GLIBCXX_DEBUG_ASSERT(m_load_max > m_load_min);
- _GLIBCXX_DEBUG_ASSERT(m_next_grow_size >= m_next_shrink_size);
+ PB_DS_DEBUG_VERIFY(m_load_max > m_load_min);
+ PB_DS_DEBUG_VERIFY(m_next_grow_size >= m_next_shrink_size);
}
# undef PB_DS_DEBUG_VERIFY
#endif
{
private:
typedef PB_DS_BASE_C_DEC base_type;
+#ifdef _GLIBCXX_DEBUG
+ typedef base_type debug_base;
+#endif
typedef typename base_type::node_pointer node_pointer;
public:
erase_node(node_pointer);
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
#define PB_DS_ASSERT_BASE_NODE_CONSISTENT(_Node) \
_GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(_Node, \
__FILE__, __LINE__);)
-#define PB_DS_CHECK_KEY_DOES_NOT_EXIST(_Key) \
- _GLIBCXX_DEBUG_ONLY(base_type::check_key_does_not_exist(_Key, \
- __FILE__, __LINE__);)
-
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/splay_tree_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp>
#include <ext/pb_ds/detail/splay_tree_/splay_fn_imps.hpp>
#include <ext/pb_ds/detail/splay_tree_/debug_fn_imps.hpp>
#include <ext/pb_ds/detail/splay_tree_/split_join_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
-#undef PB_DS_CHECK_KEY_DOES_NOT_EXIST
#undef PB_DS_ASSERT_BASE_NODE_CONSISTENT
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_NAME
/* Pot's good, let's play */
};
-#define PB_DS_ASSERT_VALID(X) \
- _GLIBCXX_DEBUG_ONLY(X.assert_valid(__FILE__, __LINE__);)
-
#define PB_DS_ASSERT_NODE_CONSISTENT(_Node, _Bool) \
_GLIBCXX_DEBUG_ONLY(assert_node_consistent(_Node, _Bool, \
__FILE__, __LINE__);)
#define PB_DS_ASSERT_AUX_NULL(X) \
_GLIBCXX_DEBUG_ONLY(X.assert_aux_null(__FILE__, __LINE__);)
-#define PB_DS_DEBUG_VERIFY(_Cond) \
- _GLIBCXX_DEBUG_VERIFY_AT(_Cond, \
- _M_message(#_Cond" assertion from %1;:%2;") \
- ._M_string(__FILE__)._M_integer(__LINE__) \
- ,__file,__line)
-
#include <ext/pb_ds/detail/thin_heap_/constructors_destructor_fn_imps.hpp>
#include <ext/pb_ds/detail/thin_heap_/debug_fn_imps.hpp>
#include <ext/pb_ds/detail/thin_heap_/trace_fn_imps.hpp>
#include <ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp>
#include <ext/pb_ds/detail/thin_heap_/split_join_fn_imps.hpp>
-#undef PB_DS_DEBUG_VERIFY
#undef PB_DS_ASSERT_AUX_NULL
#undef PB_DS_ASSERT_NODE_CONSISTENT
-#undef PB_DS_ASSERT_VALID
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_BASE_C_DEC