From 00cebc3dfb7607d36fffa9d73405442a6bde4dc1 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Wed, 31 Mar 2010 21:42:08 +0000 Subject: [PATCH] Use boost::throw_exception in unordered. [SVN r60983] --- include/boost/unordered/detail/table.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/boost/unordered/detail/table.hpp b/include/boost/unordered/detail/table.hpp index 198548d3..d37c0155 100644 --- a/include/boost/unordered/detail/table.hpp +++ b/include/boost/unordered/detail/table.hpp @@ -12,6 +12,7 @@ #include #include #include +#include #include @@ -608,15 +609,15 @@ namespace boost { namespace unordered_detail { hash_table::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