$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r60983 - trunk/boost/unordered/detail
From: daniel_james_at_[hidden]
Date: 2010-03-31 17:42:08
Author: danieljames
Date: 2010-03-31 17:42:08 EDT (Wed, 31 Mar 2010)
New Revision: 60983
URL: http://svn.boost.org/trac/boost/changeset/60983
Log:
Use boost::throw_exception in unordered.
Text files modified: 
   trunk/boost/unordered/detail/table.hpp |    11 ++++++-----                             
   1 files changed, 6 insertions(+), 5 deletions(-)
Modified: trunk/boost/unordered/detail/table.hpp
==============================================================================
--- trunk/boost/unordered/detail/table.hpp	(original)
+++ trunk/boost/unordered/detail/table.hpp	2010-03-31 17:42:08 EDT (Wed, 31 Mar 2010)
@@ -12,6 +12,7 @@
 #include <algorithm>
 #include <boost/config/no_tr1/cmath.hpp>
 #include <boost/iterator/iterator_categories.hpp>
+#include <boost/throw_exception.hpp>
 
 #include <boost/unordered/detail/buckets.hpp>
 
@@ -608,15 +609,15 @@
         hash_table<T>::at(key_type const& k) const
     {
         if(!this->size_)
-            throw std::out_of_range("Unable to find key in unordered_map.");
+            boost::throw_exception(std::out_of_range("Unable to find key in unordered_map."));
 
         bucket_ptr bucket = this->get_bucket(this->bucket_index(k));
         node_ptr it = find_iterator(bucket, k);
 
-        if (BOOST_UNORDERED_BORLAND_BOOL(it))
-            return node::get_value(it);
-        else
-            throw std::out_of_range("Unable to find key in unordered_map.");
+        if (!it)
+            boost::throw_exception(std::out_of_range("Unable to find key in unordered_map."));
+
+        return node::get_value(it);
     }
 
     // equal_range