|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61063 - in branches/release: boost/unordered boost/unordered/detail libs/unordered
From: daniel_james_at_[hidden]
Date: 2010-04-05 04:08:27
Author: danieljames
Date: 2010-04-05 04:08:25 EDT (Mon, 05 Apr 2010)
New Revision: 61063
URL: http://svn.boost.org/trac/boost/changeset/61063
Log:
Merge throw_exception use in unordered.
Properties modified:
branches/release/boost/unordered/ (props changed)
branches/release/libs/unordered/ (props changed)
Text files modified:
branches/release/boost/unordered/detail/table.hpp | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
Modified: branches/release/boost/unordered/detail/table.hpp
==============================================================================
--- branches/release/boost/unordered/detail/table.hpp (original)
+++ branches/release/boost/unordered/detail/table.hpp 2010-04-05 04:08:25 EDT (Mon, 05 Apr 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
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk