|
Boost-Commit : |
From: daniel_james_at_[hidden]
Date: 2007-12-08 13:17:45
Author: danieljames
Date: 2007-12-08 13:17:45 EST (Sat, 08 Dec 2007)
New Revision: 41902
URL: http://svn.boost.org/trac/boost/changeset/41902
Log:
Only need a single templates 'hash_types' class.
Text files modified:
sandbox-branches/unordered-refactor/boost/unordered/detail/hash_table.hpp | 42 +++++++++++++--------------------------
1 files changed, 14 insertions(+), 28 deletions(-)
Modified: sandbox-branches/unordered-refactor/boost/unordered/detail/hash_table.hpp
==============================================================================
--- sandbox-branches/unordered-refactor/boost/unordered/detail/hash_table.hpp (original)
+++ sandbox-branches/unordered-refactor/boost/unordered/detail/hash_table.hpp 2007-12-08 13:17:45 EST (Sat, 08 Dec 2007)
@@ -2198,50 +2198,36 @@
};
template <class ValueType, class KeyType,
- class Hash, class Pred, class Alloc>
- class hash_types_unique_keys
+ class Hash, class Pred, class Alloc, class EquivKeys>
+ class hash_types
{
public:
typedef BOOST_DEDUCED_TYPENAME
boost::unordered_detail::rebind_wrap<Alloc, ValueType>::type
value_allocator;
- typedef hash_table_data<value_allocator, boost::mpl::false_> data;
+ typedef hash_table_data<value_allocator, EquivKeys> data;
typedef hash_table<ValueType, KeyType, Hash, Pred,
- value_allocator, boost::mpl::false_> hash_table;
+ value_allocator, EquivKeys> hash_table;
typedef BOOST_DEDUCED_TYPENAME data::iterator_base iterator_base;
- typedef hash_const_local_iterator<value_allocator, boost::mpl::false_> const_local_iterator;
- typedef hash_local_iterator<value_allocator, boost::mpl::false_> local_iterator;
- typedef hash_const_iterator<value_allocator, boost::mpl::false_> const_iterator;
- typedef hash_iterator<value_allocator, boost::mpl::false_> iterator;
+ typedef hash_const_local_iterator<value_allocator, EquivKeys> const_local_iterator;
+ typedef hash_local_iterator<value_allocator, EquivKeys> local_iterator;
+ typedef hash_const_iterator<value_allocator, EquivKeys> const_iterator;
+ typedef hash_iterator<value_allocator, EquivKeys> iterator;
typedef BOOST_DEDUCED_TYPENAME data::size_type size_type;
typedef std::ptrdiff_t difference_type;
};
- template <class ValueType, class KeyType,
- class Hash, class Pred, class Alloc>
- class hash_types_equivalent_keys
- {
- public:
- typedef BOOST_DEDUCED_TYPENAME
- boost::unordered_detail::rebind_wrap<Alloc, ValueType>::type
- value_allocator;
-
- typedef hash_table_data<value_allocator, boost::mpl::true_> data;
- typedef hash_table<ValueType, KeyType, Hash, Pred,
- value_allocator, boost::mpl::true_> hash_table;
- typedef BOOST_DEDUCED_TYPENAME data::iterator_base iterator_base;
+ template <class ValueType, class KeyType, class Hash, class Pred, class Alloc>
+ class hash_types_unique_keys
+ : public hash_types<ValueType, KeyType, Hash, Pred, Alloc, boost::mpl::false_> {};
- typedef hash_const_local_iterator<value_allocator, boost::mpl::true_> const_local_iterator;
- typedef hash_local_iterator<value_allocator, boost::mpl::true_> local_iterator;
- typedef hash_const_iterator<value_allocator, boost::mpl::true_> const_iterator;
- typedef hash_iterator<value_allocator, boost::mpl::true_> iterator;
+ template <class ValueType, class KeyType, class Hash, class Pred, class Alloc>
+ class hash_types_equivalent_keys
+ : public hash_types<ValueType, KeyType, Hash, Pred, Alloc, boost::mpl::true_> {};
- typedef BOOST_DEDUCED_TYPENAME data::size_type size_type;
- typedef std::ptrdiff_t difference_type;
- };
} // namespace boost::unordered_detail
} // namespace boost
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