Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74122 - in trunk: boost/unordered/detail libs/unordered/test/unordered
From: dnljms_at_[hidden]
Date: 2011-08-29 07:10:09


Author: danieljames
Date: 2011-08-29 07:10:09 EDT (Mon, 29 Aug 2011)
New Revision: 74122
URL: http://svn.boost.org/trac/boost/changeset/74122

Log:
Unordered: More portability changes.
Text files modified:
   trunk/boost/unordered/detail/allocator_helpers.hpp | 4 +++-
   trunk/boost/unordered/detail/buckets.hpp | 19 ++++++++++---------
   trunk/boost/unordered/detail/extract_key.hpp | 4 ----
   trunk/libs/unordered/test/unordered/minimal_allocator.cpp | 2 +-
   4 files changed, 14 insertions(+), 15 deletions(-)

Modified: trunk/boost/unordered/detail/allocator_helpers.hpp
==============================================================================
--- trunk/boost/unordered/detail/allocator_helpers.hpp (original)
+++ trunk/boost/unordered/detail/allocator_helpers.hpp 2011-08-29 07:10:09 EDT (Mon, 29 Aug 2011)
@@ -20,6 +20,7 @@
 #include <boost/utility/enable_if.hpp>
 #include <boost/preprocessor/cat.hpp>
 #include <boost/limits.hpp>
+#include <boost/type_traits/add_lvalue_reference.hpp>
 
 #if (defined(BOOST_NO_STD_ALLOCATOR) || defined(BOOST_DINKUMWARE_STDLIB)) \
     && !defined(__BORLANDC__)
@@ -83,7 +84,8 @@
     };
 # endif
 
- template <typename T> T& make();
+ template <typename T> BOOST_DEDUCED_TYPENAME
+ boost::add_lvalue_reference<T>::type make();
     struct choice9 { typedef char (&type)[9]; };
     struct choice8 : choice9 { typedef char (&type)[8]; };
     struct choice7 : choice8 { typedef char (&type)[7]; };

Modified: trunk/boost/unordered/detail/buckets.hpp
==============================================================================
--- trunk/boost/unordered/detail/buckets.hpp (original)
+++ trunk/boost/unordered/detail/buckets.hpp 2011-08-29 07:10:09 EDT (Mon, 29 Aug 2011)
@@ -668,10 +668,10 @@
         class T, \
         BOOST_UNORDERED_TEMPLATE_ARGS(z, num_params) \
> \
- inline void construct_impl( \
- BOOST_DEDUCED_TYPENAME \
- boost::disable_if<emulated_pair_constructor<T>, void*>::type \
- address, \
+ inline BOOST_DEDUCED_TYPENAME \
+ boost::disable_if<emulated_pair_constructor<T> >::type \
+ construct_impl( \
+ void* address, \
         BOOST_UNORDERED_FUNCTION_PARAMS(z, num_params) \
     ) \
     { \
@@ -686,11 +686,12 @@
     template <class T, class Key, \
         BOOST_UNORDERED_TEMPLATE_ARGS(z, num_params) \
> \
- inline void construct_impl( \
- BOOST_DEDUCED_TYPENAME \
- boost::enable_if<emulated_pair_constructor<T>, void*>::type \
- address, \
- Key const& k, BOOST_UNORDERED_FUNCTION_PARAMS(z, num_params)) \
+ inline BOOST_DEDUCED_TYPENAME \
+ boost::enable_if<emulated_pair_constructor<T> >::type \
+ construct_impl( \
+ void* address, \
+ BOOST_FWD_REF(Key) k, \
+ BOOST_UNORDERED_FUNCTION_PARAMS(z, num_params)) \
     { \
         new(address) T(k, \
             BOOST_DEDUCED_TYPENAME \

Modified: trunk/boost/unordered/detail/extract_key.hpp
==============================================================================
--- trunk/boost/unordered/detail/extract_key.hpp (original)
+++ trunk/boost/unordered/detail/extract_key.hpp 2011-08-29 07:10:09 EDT (Mon, 29 Aug 2011)
@@ -165,10 +165,6 @@
         }
 #endif
 
- choice1::type is_key_test(key_type const&);
- template <typename T>
- choice2::type is_key_test(T const&);
-
 #if defined(BOOST_UNORDERED_STD_FORWARD_MOVE)
 
 #define BOOST_UNORDERED_KEY_FROM_TUPLE(namespace_) \

Modified: trunk/libs/unordered/test/unordered/minimal_allocator.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/minimal_allocator.cpp (original)
+++ trunk/libs/unordered/test/unordered/minimal_allocator.cpp 2011-08-29 07:10:09 EDT (Mon, 29 Aug 2011)
@@ -86,4 +86,4 @@
     test_simple_allocator<test::object>();
 
     return boost::report_errors();
-}
\ No newline at end of file
+}


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