+2008-07-19 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp
+ (assert_node_consistent): Avoid ambiguous else warning.
+
+ * include/ext/pb_ds/detail/debug_map_base.hpp: Include <iostream>.
+
+ * include/bits/c++config: In debug-mode (and parallel-mode) set
+ _GLIBCXX_EXTERN_TEMPLATE to -1, not 0, thus disabling extern
+ templates only for basic_string (per libstdc++/21674).
+ * include/bits/basic_string.tcc: Use extern templates when
+ _GLIBCXX_EXTERN_TEMPLATE > 0.
+
2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
Holger Hopp <holger.hopp@sap.com>
// Inhibit implicit instantiations for required instantiations,
// which are defined via explicit instantiations elsewhere.
// NB: This syntax is a GNU extension.
-#if _GLIBCXX_EXTERN_TEMPLATE
+#if _GLIBCXX_EXTERN_TEMPLATE > 0
extern template class basic_string<char>;
extern template
basic_istream<char>&
# define _GLIBCXX_STD __cxx1998
# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
# define _GLIBCXX_END_NAMESPACE }
-# define _GLIBCXX_EXTERN_TEMPLATE 0
+# define _GLIBCXX_EXTERN_TEMPLATE -1
# endif
// parallel
# define _GLIBCXX_STD __cxx1998
# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
# define _GLIBCXX_END_NAMESPACE }
-# define _GLIBCXX_EXTERN_TEMPLATE 0
+# define _GLIBCXX_EXTERN_TEMPLATE -1
# endif
// debug + parallel
# define _GLIBCXX_STD __cxx1998
# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
# define _GLIBCXX_END_NAMESPACE }
-# define _GLIBCXX_EXTERN_TEMPLATE 0
+# define _GLIBCXX_EXTERN_TEMPLATE -1
# endif
# if __NO_INLINE__ && !__GXX_WEAK__
// -*- C++ -*-
-// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
return;
_GLIBCXX_DEBUG_ASSERT(base_type::parent(m_p_max) == NULL);
for (const_iterator it = base_type::begin(); it != base_type::end(); ++it)
- _GLIBCXX_DEBUG_ASSERT(!Cmp_Fn::operator()(m_p_max->m_value, it.m_p_nd->m_value));
+ _GLIBCXX_DEBUG_ASSERT(!Cmp_Fn::operator()(m_p_max->m_value,
+ it.m_p_nd->m_value));
}
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-assert_node_consistent(const_node_pointer p_nd, bool strictly_binomial, bool increasing) const
+assert_node_consistent(const_node_pointer p_nd, bool strictly_binomial,
+ bool increasing) const
{
_GLIBCXX_DEBUG_ASSERT(increasing || strictly_binomial);
base_type::assert_node_consistent(p_nd, false);
assert_node_consistent(p_nd->m_p_next_sibling, strictly_binomial, increasing);
assert_node_consistent(p_nd->m_p_l_child, true, false);
if (p_nd->m_p_next_sibling != NULL)
- if (increasing)
- {
- if (strictly_binomial)
- _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata < p_nd->m_p_next_sibling->m_metadata);
- else
- _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata <= p_nd->m_p_next_sibling->m_metadata);
- }
- else
- _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata > p_nd->m_p_next_sibling->m_metadata);
+ {
+ if (increasing)
+ {
+ if (strictly_binomial)
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata
+ < p_nd->m_p_next_sibling->m_metadata);
+ else
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata
+ <= p_nd->m_p_next_sibling->m_metadata);
+ }
+ else
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata
+ > p_nd->m_p_next_sibling->m_metadata);
+ }
}
-#endif
+#endif
// -*- C++ -*-
-// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
#include <list>
#include <utility>
#include <cstdlib>
+#include <iostream>
#include <ext/throw_allocator.h>
#include <debug/debug.h>