Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2008-04-13 07:59:47


Author: danieljames
Date: 2008-04-13 07:59:46 EDT (Sun, 13 Apr 2008)
New Revision: 44366
URL: http://svn.boost.org/trac/boost/changeset/44366

Log:
Avoid using rvalue references in the implementation files.
Text files modified:
   branches/unordered/trunk/boost/unordered/detail/hash_table.hpp | 1 +
   branches/unordered/trunk/boost/unordered/detail/hash_table_impl.hpp | 22 +++++++++-------------
   branches/unordered/trunk/boost/unordered_map.hpp | 8 ++++----
   branches/unordered/trunk/boost/unordered_set.hpp | 8 ++++----
   4 files changed, 18 insertions(+), 21 deletions(-)

Modified: branches/unordered/trunk/boost/unordered/detail/hash_table.hpp
==============================================================================
--- branches/unordered/trunk/boost/unordered/detail/hash_table.hpp (original)
+++ branches/unordered/trunk/boost/unordered/detail/hash_table.hpp 2008-04-13 07:59:46 EDT (Sun, 13 Apr 2008)
@@ -121,6 +121,7 @@
         }
 #endif
 
+ struct move_tag {};
     }
 }
 

Modified: branches/unordered/trunk/boost/unordered/detail/hash_table_impl.hpp
==============================================================================
--- branches/unordered/trunk/boost/unordered/detail/hash_table_impl.hpp (original)
+++ branches/unordered/trunk/boost/unordered/detail/hash_table_impl.hpp 2008-04-13 07:59:46 EDT (Sun, 13 Apr 2008)
@@ -336,8 +336,7 @@
                 create_buckets();
             }
 
-#if defined(BOOST_HAS_RVALUE_REFS)
- BOOST_UNORDERED_TABLE_DATA(BOOST_UNORDERED_TABLE_DATA&& x)
+ BOOST_UNORDERED_TABLE_DATA(BOOST_UNORDERED_TABLE_DATA& x, move_tag)
                 : allocators_(x.allocators_),
                 buckets_(x.buckets_), bucket_count_(x.bucket_count_),
                 cached_begin_bucket_(x.cached_begin_bucket_), size_(x.size_)
@@ -345,8 +344,8 @@
                 unordered_detail::reset(x.buckets_);
             }
 
- BOOST_UNORDERED_TABLE_DATA(BOOST_UNORDERED_TABLE_DATA&& x,
- value_allocator const& a, size_type n)
+ BOOST_UNORDERED_TABLE_DATA(BOOST_UNORDERED_TABLE_DATA& x,
+ value_allocator const& a, size_type n, move_tag)
                 : allocators_(a), buckets_(), bucket_count_(),
                 cached_begin_bucket_(), size_(0)
             {
@@ -363,7 +362,6 @@
                     create_buckets();
                 }
             }
-#endif
 
             // no throw
             ~BOOST_UNORDERED_TABLE_DATA()
@@ -1151,27 +1149,26 @@
                 copy_buckets(x.data_, data_, current_functions());
             }
 
-#if defined(BOOST_HAS_RVALUE_REFS)
             // Move Construct
 
- BOOST_UNORDERED_TABLE(BOOST_UNORDERED_TABLE&& x)
+ BOOST_UNORDERED_TABLE(BOOST_UNORDERED_TABLE& x, move_tag m)
                 : func1_(x.current_functions()), // throws
                 func2_(x.current_functions()), // throws
                 func_(&BOOST_UNORDERED_TABLE::func1_), // no throw
                 mlf_(x.mlf_), // no throw
- data_(std::move(x.data_)) // throws
+ data_(x.data_, m) // throws
             {
                 calculate_max_load(); // no throw
             }
 
- BOOST_UNORDERED_TABLE(BOOST_UNORDERED_TABLE&& x,
- value_allocator const& a)
+ BOOST_UNORDERED_TABLE(BOOST_UNORDERED_TABLE& x,
+ value_allocator const& a, move_tag m)
                 : func1_(x.current_functions()), // throws
                 func2_(x.current_functions()), // throws
                 func_(&BOOST_UNORDERED_TABLE::func1_), // no throw
                 mlf_(x.mlf_), // no throw
- data_(std::move(x.data_),
- a, x.min_buckets_for_size(x.size())) // throws
+ data_(x.data_, a,
+ x.min_buckets_for_size(x.size()), m) // throws
             {
                 calculate_max_load(); // no throw
 
@@ -1181,7 +1178,6 @@
                     copy_buckets(x.data_, data_, current_functions());
                 }
             }
-#endif
 
             // Assign
             //

Modified: branches/unordered/trunk/boost/unordered_map.hpp
==============================================================================
--- branches/unordered/trunk/boost/unordered_map.hpp (original)
+++ branches/unordered/trunk/boost/unordered_map.hpp 2008-04-13 07:59:46 EDT (Sun, 13 Apr 2008)
@@ -85,12 +85,12 @@
 
 #if defined(BOOST_HAS_RVALUE_REFS)
         unordered_map(unordered_map&& other)
- : base(std::move(other.base))
+ : base(other.base, boost::unordered_detail::move_tag())
         {
         }
 
         unordered_map(unordered_map&& other, allocator_type const& a)
- : base(std::move(other.base), a)
+ : base(other.base, a, boost::unordered_detail::move_tag())
         {
         }
 #endif
@@ -429,12 +429,12 @@
 
 #if defined(BOOST_HAS_RVALUE_REFS)
         unordered_multimap(unordered_multimap&& other)
- : base(std::move(other.base))
+ : base(other.base, boost::unordered_detail::move_tag())
         {
         }
 
         unordered_multimap(unordered_multimap&& other, allocator_type const& a)
- : base(std::move(other.base), a)
+ : base(other.base, a, boost::unordered_detail::move_tag())
         {
         }
 #endif

Modified: branches/unordered/trunk/boost/unordered_set.hpp
==============================================================================
--- branches/unordered/trunk/boost/unordered_set.hpp (original)
+++ branches/unordered/trunk/boost/unordered_set.hpp 2008-04-13 07:59:46 EDT (Sun, 13 Apr 2008)
@@ -83,12 +83,12 @@
 
 #if defined(BOOST_HAS_RVALUE_REFS)
         unordered_set(unordered_set&& other)
- : base(std::move(other.base))
+ : base(other.base, boost::unordered_detail::move_tag())
         {
         }
 
         unordered_set(unordered_set&& other, allocator_type const& a)
- : base(std::move(other.base), a)
+ : base(other.base, a, boost::unordered_detail::move_tag())
         {
         }
 #endif
@@ -398,12 +398,12 @@
 
 #if defined(BOOST_HAS_RVALUE_REFS)
         unordered_multiset(unordered_multiset&& other)
- : base(std::move(other.base))
+ : base(other.base, boost::unordered_detail::move_tag())
         {
         }
 
         unordered_multiset(unordered_multiset&& other, allocator_type const& a)
- : base(std::move(other.base), a)
+ : base(other.base, a, boost::unordered_detail::move_tag())
         {
         }
 #endif


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