|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r75742 - in trunk/boost/unordered: . detail
From: dnljms_at_[hidden]
Date: 2011-11-30 03:21:06
Author: danieljames
Date: 2011-11-30 03:21:04 EST (Wed, 30 Nov 2011)
New Revision: 75742
URL: http://svn.boost.org/trac/boost/changeset/75742
Log:
Unordered: Move rebind into 'types' classes.
Makes the types in error messages a tad bit nicer.
Text files modified:
trunk/boost/unordered/detail/equivalent.hpp | 28 +++++++++++++++-------------
trunk/boost/unordered/detail/unique.hpp | 28 +++++++++++++++-------------
trunk/boost/unordered/unordered_map.hpp | 24 ++++++------------------
trunk/boost/unordered/unordered_set.hpp | 24 ++++++------------------
4 files changed, 42 insertions(+), 62 deletions(-)
Modified: trunk/boost/unordered/detail/equivalent.hpp
==============================================================================
--- trunk/boost/unordered/detail/equivalent.hpp (original)
+++ trunk/boost/unordered/detail/equivalent.hpp 2011-11-30 03:21:04 EST (Wed, 30 Nov 2011)
@@ -115,20 +115,21 @@
typedef typename pick::link_pointer link_pointer;
};
- template <typename A, typename H, typename P>
+ template <typename A, typename T, typename H, typename P>
struct multiset
{
- typedef boost::unordered::detail::multiset<A, H, P> types;
+ 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 boost::unordered::detail::allocator_traits<A> traits;
- typedef typename traits::value_type value_type;
- typedef value_type key_type;
+ typedef typename boost::unordered::detail::rebind_wrap<
+ A, value_type>::type allocator;
- typedef boost::unordered::detail::pick_grouped_node<A, value_type> pick;
+ typedef boost::unordered::detail::allocator_traits<allocator> traits;
+ 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;
@@ -137,20 +138,21 @@
typedef boost::unordered::detail::set_extractor<value_type> extractor;
};
- template <typename A, typename K, typename H, typename P>
+ template <typename A, typename K, typename M, typename H, typename P>
struct multimap
{
- typedef boost::unordered::detail::multimap<A, K, H, P> types;
+ 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 boost::unordered::detail::allocator_traits<A> traits;
- typedef typename traits::value_type value_type;
+ typedef typename boost::unordered::detail::rebind_wrap<
+ A, value_type>::type allocator;
- typedef boost::unordered::detail::pick_grouped_node<A, value_type> pick;
+ typedef boost::unordered::detail::allocator_traits<allocator> traits;
+ 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/unique.hpp
==============================================================================
--- trunk/boost/unordered/detail/unique.hpp (original)
+++ trunk/boost/unordered/detail/unique.hpp 2011-11-30 03:21:04 EST (Wed, 30 Nov 2011)
@@ -111,20 +111,21 @@
typedef typename pick::link_pointer link_pointer;
};
- template <typename A, typename H, typename P>
+ template <typename A, typename T, typename H, typename P>
struct set
{
- typedef boost::unordered::detail::set<A, H, P> types;
+ 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 boost::unordered::detail::allocator_traits<A> traits;
- typedef typename traits::value_type value_type;
- typedef value_type key_type;
+ typedef typename boost::unordered::detail::rebind_wrap<
+ A, value_type>::type allocator;
- typedef boost::unordered::detail::pick_node<A, value_type> pick;
+ 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;
typedef typename pick::link_pointer link_pointer;
@@ -133,20 +134,21 @@
typedef boost::unordered::detail::set_extractor<value_type> extractor;
};
- template <typename A, typename K, typename H, typename P>
+ template <typename A, typename K, typename M, typename H, typename P>
struct map
{
- typedef boost::unordered::detail::map<A, K, H, P> types;
+ 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 boost::unordered::detail::allocator_traits<A> traits;
- typedef typename traits::value_type value_type;
+ typedef typename boost::unordered::detail::rebind_wrap<
+ A, value_type>::type allocator;
- typedef boost::unordered::detail::pick_node<A, value_type> pick;
+ 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;
typedef typename pick::link_pointer link_pointer;
Modified: trunk/boost/unordered/unordered_map.hpp
==============================================================================
--- trunk/boost/unordered/unordered_map.hpp (original)
+++ trunk/boost/unordered/unordered_map.hpp 2011-11-30 03:21:04 EST (Wed, 30 Nov 2011)
@@ -54,15 +54,9 @@
private:
- typedef typename boost::unordered::detail::rebind_wrap<
- allocator_type, value_type>::type
- value_allocator;
-
- typedef boost::unordered::detail::allocator_traits<value_allocator>
- allocator_traits;
-
- typedef boost::unordered::detail::map<value_allocator, K, H, P>
- types;
+ 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;
public:
@@ -446,15 +440,9 @@
private:
- typedef typename boost::unordered::detail::rebind_wrap<
- allocator_type, value_type>::type
- value_allocator;
-
- typedef boost::unordered::detail::allocator_traits<value_allocator>
- allocator_traits;
-
- typedef boost::unordered::detail::multimap<value_allocator, K, H, P>
- types;
+ 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;
public:
Modified: trunk/boost/unordered/unordered_set.hpp
==============================================================================
--- trunk/boost/unordered/unordered_set.hpp (original)
+++ trunk/boost/unordered/unordered_set.hpp 2011-11-30 03:21:04 EST (Wed, 30 Nov 2011)
@@ -52,15 +52,9 @@
private:
- typedef typename boost::unordered::detail::rebind_wrap<
- allocator_type, value_type>::type
- value_allocator;
-
- typedef boost::unordered::detail::allocator_traits<value_allocator>
- allocator_traits;
-
- typedef boost::unordered::detail::set<value_allocator, H, P>
- types;
+ 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;
public:
@@ -429,15 +423,9 @@
private:
- typedef typename boost::unordered::detail::rebind_wrap<
- allocator_type, value_type>::type
- value_allocator;
-
- typedef boost::unordered::detail::allocator_traits<value_allocator>
- allocator_traits;
-
- typedef boost::unordered::detail::multiset<value_allocator, H, P>
- types;
+ 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;
public:
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