re PR libstdc++/25191 (exception_defines.h #defines try/catch)
[gcc.git] / libstdc++-v3 / include / ext / pb_ds / detail / resize_policy / hash_load_check_resize_trigger_imp.hpp
index f3c597f934087ff002a5f5fa68b49343ea3ae7a4..594965f00b8cbb82bbfa7ab89ea4be9d24ada1c1 100644 (file)
@@ -1,6 +1,6 @@
 // -*- 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
@@ -44,9 +44,6 @@
  * 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) 
@@ -178,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);
@@ -262,13 +259,13 @@ set_loads(std::pair<float, float> load_pair)
   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;
@@ -283,7 +280,7 @@ PB_DS_CLASS_T_DEC
 void
 PB_DS_CLASS_C_DEC::
 do_resize(size_type)
-{ abort(); }
+{ std::abort(); }
 
 #ifdef _GLIBCXX_DEBUG
 PB_DS_CLASS_T_DEC
@@ -296,5 +293,3 @@ assert_valid() const
 }
 #endif 
 
-#undef PB_DS_STATIC_ASSERT
-