|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61872 - trunk/boost/unordered/detail
From: daniel_james_at_[hidden]
Date: 2010-05-09 03:24:49
Author: danieljames
Date: 2010-05-09 03:24:47 EDT (Sun, 09 May 2010)
New Revision: 61872
URL: http://svn.boost.org/trac/boost/changeset/61872
Log:
Another inline.
Text files modified:
trunk/boost/unordered/detail/fwd.hpp | 24 +++++++++++++++++++++---
trunk/boost/unordered/detail/node.hpp | 6 ------
trunk/boost/unordered/detail/table.hpp | 17 -----------------
trunk/boost/unordered/detail/unique.hpp | 2 +-
4 files changed, 22 insertions(+), 27 deletions(-)
Modified: trunk/boost/unordered/detail/fwd.hpp
==============================================================================
--- trunk/boost/unordered/detail/fwd.hpp (original)
+++ trunk/boost/unordered/detail/fwd.hpp 2010-05-09 03:24:47 EDT (Sun, 09 May 2010)
@@ -58,6 +58,12 @@
#endif
+#if BOOST_WORKAROUND(__BORLANDC__, <= 0X0582)
+#define BOOST_UNORDERED_BORLAND_BOOL(x) (bool)(x)
+#else
+#define BOOST_UNORDERED_BORLAND_BOOL(x) x
+#endif
+
namespace boost { namespace unordered_detail {
static const float minimum_max_load_factor = 1e-3f;
@@ -469,13 +475,25 @@
return extractor::extract(node::get_value(n));
}
bool equal(key_type const& k, value_type const& v) const;
+
template <class Key, class Pred>
- node_ptr find_iterator(bucket_ptr bucket, Key const& k,
- Pred const&) const;
+ inline node_ptr find_iterator(bucket_ptr bucket, Key const& k,
+ Pred const& eq) const
+ {
+ node_ptr it = bucket->next_;
+ while (BOOST_UNORDERED_BORLAND_BOOL(it) &&
+ !eq(k, get_key(node::get_value(it))))
+ {
+ it = node::next_group(it);
+ }
+
+ return it;
+ }
+
node_ptr find_iterator(bucket_ptr bucket, key_type const& k) const;
node_ptr find_iterator(key_type const& k) const;
node_ptr* find_for_erase(bucket_ptr bucket, key_type const& k) const;
-
+
// Load methods
std::size_t max_size() const;
Modified: trunk/boost/unordered/detail/node.hpp
==============================================================================
--- trunk/boost/unordered/detail/node.hpp (original)
+++ trunk/boost/unordered/detail/node.hpp 2010-05-09 03:24:47 EDT (Sun, 09 May 2010)
@@ -16,12 +16,6 @@
#include <boost/detail/workaround.hpp>
#include <boost/unordered/detail/fwd.hpp>
-#if BOOST_WORKAROUND(__BORLANDC__, <= 0X0582)
-#define BOOST_UNORDERED_BORLAND_BOOL(x) (bool)(x)
-#else
-#define BOOST_UNORDERED_BORLAND_BOOL(x) x
-#endif
-
namespace boost { namespace unordered_detail {
////////////////////////////////////////////////////////////////////////////
Modified: trunk/boost/unordered/detail/table.hpp
==============================================================================
--- trunk/boost/unordered/detail/table.hpp (original)
+++ trunk/boost/unordered/detail/table.hpp 2010-05-09 03:24:47 EDT (Sun, 09 May 2010)
@@ -31,23 +31,6 @@
// strong exception safety, no side effects
template <class T>
- template <class Key, class Pred>
- inline BOOST_DEDUCED_TYPENAME T::node_ptr
- hash_table<T>::find_iterator(bucket_ptr bucket, Key const& k,
- Pred const& eq) const
- {
- node_ptr it = bucket->next_;
- while (BOOST_UNORDERED_BORLAND_BOOL(it) &&
- !eq(k, get_key(node::get_value(it))))
- {
- it = node::next_group(it);
- }
-
- return it;
- }
-
- // strong exception safety, no side effects
- template <class T>
inline BOOST_DEDUCED_TYPENAME T::node_ptr
hash_table<T>::find_iterator(
bucket_ptr bucket, key_type const& k) const
Modified: trunk/boost/unordered/detail/unique.hpp
==============================================================================
--- trunk/boost/unordered/detail/unique.hpp (original)
+++ trunk/boost/unordered/detail/unique.hpp 2010-05-09 03:24:47 EDT (Sun, 09 May 2010)
@@ -248,7 +248,7 @@
// strong otherwise
template<class... Args>
- emplace_return hash_unique_table<T>::emplace(Args&&... args)
+ emplace_return emplace(Args&&... args)
{
return this->size_ ?
emplace_impl(
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