|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80387 - in trunk/boost/unordered: . detail
From: dnljms_at_[hidden]
Date: 2012-09-03 16:04:56
Author: danieljames
Date: 2012-09-03 16:04:55 EDT (Mon, 03 Sep 2012)
New Revision: 80387
URL: http://svn.boost.org/trac/boost/changeset/80387
Log:
Unordered: No need for value_allocator.
Text files modified:
trunk/boost/unordered/detail/equivalent.hpp | 14 ++++++--------
trunk/boost/unordered/detail/table.hpp | 7 +++----
trunk/boost/unordered/detail/unique.hpp | 11 ++++-------
trunk/boost/unordered/unordered_map.hpp | 2 --
trunk/boost/unordered/unordered_set.hpp | 2 --
5 files changed, 13 insertions(+), 23 deletions(-)
Modified: trunk/boost/unordered/detail/equivalent.hpp
==============================================================================
--- trunk/boost/unordered/detail/equivalent.hpp (original)
+++ trunk/boost/unordered/detail/equivalent.hpp 2012-09-03 16:04:55 EDT (Mon, 03 Sep 2012)
@@ -125,16 +125,15 @@
{
typedef boost::unordered::detail::multiset<A, T, H, P> types;
+ typedef A allocator;
typedef T value_type;
typedef H hasher;
typedef P key_equal;
typedef T key_type;
- typedef typename boost::unordered::detail::rebind_wrap<
- A, value_type>::type allocator;
-
typedef boost::unordered::detail::allocator_traits<allocator> traits;
- typedef boost::unordered::detail::pick_grouped_node<allocator, value_type> pick;
+ typedef boost::unordered::detail::pick_grouped_node<allocator,
+ value_type> pick;
typedef typename pick::node node;
typedef typename pick::bucket bucket;
typedef typename pick::link_pointer link_pointer;
@@ -150,16 +149,15 @@
{
typedef boost::unordered::detail::multimap<A, K, M, H, P> types;
+ typedef A allocator;
typedef std::pair<K const, M> value_type;
typedef H hasher;
typedef P key_equal;
typedef K key_type;
- typedef typename boost::unordered::detail::rebind_wrap<
- A, value_type>::type allocator;
-
typedef boost::unordered::detail::allocator_traits<allocator> traits;
- typedef boost::unordered::detail::pick_grouped_node<allocator, value_type> pick;
+ typedef boost::unordered::detail::pick_grouped_node<allocator,
+ value_type> pick;
typedef typename pick::node node;
typedef typename pick::bucket bucket;
typedef typename pick::link_pointer link_pointer;
Modified: trunk/boost/unordered/detail/table.hpp
==============================================================================
--- trunk/boost/unordered/detail/table.hpp (original)
+++ trunk/boost/unordered/detail/table.hpp 2012-09-03 16:04:55 EDT (Mon, 03 Sep 2012)
@@ -144,12 +144,11 @@
typename Types::hasher,
typename Types::key_equal> functions;
- // TODO: Better to use the original allocator here.
- typedef typename Types::allocator value_allocator;
+ typedef typename Types::allocator allocator;
typedef typename boost::unordered::detail::
- rebind_wrap<value_allocator, node>::type node_allocator;
+ rebind_wrap<allocator, node>::type node_allocator;
typedef typename boost::unordered::detail::
- rebind_wrap<value_allocator, bucket>::type bucket_allocator;
+ rebind_wrap<allocator, bucket>::type bucket_allocator;
typedef boost::unordered::detail::allocator_traits<node_allocator>
node_allocator_traits;
typedef boost::unordered::detail::allocator_traits<bucket_allocator>
Modified: trunk/boost/unordered/detail/unique.hpp
==============================================================================
--- trunk/boost/unordered/detail/unique.hpp (original)
+++ trunk/boost/unordered/detail/unique.hpp 2012-09-03 16:04:55 EDT (Mon, 03 Sep 2012)
@@ -121,14 +121,12 @@
{
typedef boost::unordered::detail::set<A, T, H, P> types;
+ typedef A allocator;
typedef T value_type;
typedef H hasher;
typedef P key_equal;
typedef T key_type;
- typedef typename boost::unordered::detail::rebind_wrap<
- A, value_type>::type allocator;
-
typedef boost::unordered::detail::allocator_traits<allocator> traits;
typedef boost::unordered::detail::pick_node<allocator, value_type> pick;
typedef typename pick::node node;
@@ -146,15 +144,14 @@
{
typedef boost::unordered::detail::map<A, K, M, H, P> types;
+ typedef A allocator;
typedef std::pair<K const, M> value_type;
typedef H hasher;
typedef P key_equal;
typedef K key_type;
- typedef typename boost::unordered::detail::rebind_wrap<
- A, value_type>::type allocator;
-
- typedef boost::unordered::detail::allocator_traits<allocator> traits;
+ typedef boost::unordered::detail::allocator_traits<allocator>
+ traits;
typedef boost::unordered::detail::pick_node<allocator, value_type> pick;
typedef typename pick::node node;
typedef typename pick::bucket bucket;
Modified: trunk/boost/unordered/unordered_map.hpp
==============================================================================
--- trunk/boost/unordered/unordered_map.hpp (original)
+++ trunk/boost/unordered/unordered_map.hpp 2012-09-03 16:04:55 EDT (Mon, 03 Sep 2012)
@@ -56,7 +56,6 @@
private:
typedef boost::unordered::detail::map<A, K, T, H, P> types;
- typedef typename types::allocator value_allocator;
typedef typename types::traits allocator_traits;
typedef typename types::table table;
@@ -542,7 +541,6 @@
private:
typedef boost::unordered::detail::multimap<A, K, T, H, P> types;
- typedef typename types::allocator value_allocator;
typedef typename types::traits allocator_traits;
typedef typename types::table table;
Modified: trunk/boost/unordered/unordered_set.hpp
==============================================================================
--- trunk/boost/unordered/unordered_set.hpp (original)
+++ trunk/boost/unordered/unordered_set.hpp 2012-09-03 16:04:55 EDT (Mon, 03 Sep 2012)
@@ -54,7 +54,6 @@
private:
typedef boost::unordered::detail::set<A, T, H, P> types;
- typedef typename types::allocator value_allocator;
typedef typename types::traits allocator_traits;
typedef typename types::table table;
@@ -526,7 +525,6 @@
private:
typedef boost::unordered::detail::multiset<A, T, H, P> types;
- typedef typename types::allocator value_allocator;
typedef typename types::traits allocator_traits;
typedef typename types::table table;
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