// -*- C++ -*-
-// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 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
* Contains a resize trigger implementation.
*/
-#define PB_DS_STATIC_ASSERT(UNIQUE, E) \
- typedef detail::static_assert_dumclass<sizeof(detail::static_assert<bool(E)>)> UNIQUE##static_assert_type
-
PB_DS_CLASS_T_DEC
PB_DS_CLASS_C_DEC::
hash_load_check_resize_trigger(float load_min, float load_max)
{
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);
const size_type old_next_grow_size = m_next_grow_size;
const bool old_resize_needed = m_resize_needed;
- try
+ __try
{
m_load_min = load_pair.first;
m_load_max = load_pair.second;
do_resize(static_cast<size_type>(size_base::get_size() / ((m_load_min + m_load_max) / 2)));
}
- catch (...)
+ __catch(...)
{
m_load_min = old_load_min;
m_load_max = old_load_max;
void
PB_DS_CLASS_C_DEC::
do_resize(size_type)
-{ abort(); }
+{ std::abort(); }
#ifdef _GLIBCXX_DEBUG
PB_DS_CLASS_T_DEC
}
#endif
-#undef PB_DS_STATIC_ASSERT
-