[prev in list] [next in list] [prev in thread] [next in thread] 

List:       boost-commit
Subject:    [Boost-commit] svn:boost r41513 - in branches/release/boost: .
From:       joaquin () tid ! es
Date:       2007-11-30 21:09:14
Message-ID: 20071130210914.C0F9A2F812A () wowbagger ! osl ! iu ! edu
[Download RAW message or body]

Author: joaquin
Date: 2007-11-30 16:09:14 EST (Fri, 30 Nov 2007)
New Revision: 41513
URL: http://svn.boost.org/trac/boost/changeset/41513

Log:
merged rev. 41397 from trunk
Added:
   branches/release/boost/multi_index/detail/adl_swap.hpp
      - copied unchanged from r41512, /trunk/boost/multi_index/detail/adl_swap.hpp
Text files modified: 
   branches/release/boost/multi_index/detail/auto_space.hpp |    25 \
+++++--------------------                 \
branches/release/boost/multi_index_container.hpp         |    10 ++--------           \
  2 files changed, 7 insertions(+), 28 deletions(-)

Modified: branches/release/boost/multi_index/detail/auto_space.hpp
==============================================================================
--- branches/release/boost/multi_index/detail/auto_space.hpp	(original)
+++ branches/release/boost/multi_index/detail/auto_space.hpp	2007-11-30 16:09:14 EST \
(Fri, 30 Nov 2007) @@ -16,6 +16,7 @@
 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
 #include <algorithm>
 #include <boost/detail/allocator_utilities.hpp>
+#include <boost/multi_index/detail/adl_swap.hpp>
 #include <boost/multi_index/detail/prevent_eti.hpp>
 #include <boost/noncopyable.hpp>
 #include <memory>
@@ -65,30 +66,14 @@
 
   pointer data()const{return data_;}
 
-  void swap(auto_space& x){swap_(x);}
-    
-private:
-  void swap_(auto_space& x)
+  void swap(auto_space& x)
   {
-    /* Swapping is done inside swap_() rather than swap() so as to avoid
-     * name hiding when ADLing swap below. Not sure if this is legally
-     * required, though.
-     */
-
-    if(al_!=x.al_){
-
-#if defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
-      std::swap(al_,x.al_);
-#else
-      using std::swap;
-      swap(al_,x.al_);
-#endif
-
-    }
+    if(al_!=x.al_)adl_swap(al_,x.al_);
     std::swap(n_,x.n_);
     std::swap(data_,x.data_);
   }
-
+    
+private:
   typename boost::detail::allocator::rebind_to<
     Allocator,T>::type                          al_;
   std::size_t                                   n_;

Modified: branches/release/boost/multi_index_container.hpp
==============================================================================
--- branches/release/boost/multi_index_container.hpp	(original)
+++ branches/release/boost/multi_index_container.hpp	2007-11-30 16:09:14 EST (Fri, 30 \
Nov 2007) @@ -29,6 +29,7 @@
 #include <boost/mpl/deref.hpp>
 #include <boost/multi_index_container_fwd.hpp>
 #include <boost/multi_index/detail/access_specifier.hpp>
+#include <boost/multi_index/detail/adl_swap.hpp>
 #include <boost/multi_index/detail/base_type.hpp>
 #include <boost/multi_index/detail/converter.hpp>
 #include <boost/multi_index/detail/header_holder.hpp>
@@ -540,14 +541,7 @@
   void swap_(multi_index_container<Value,IndexSpecifierList,Allocator>& x)
   {
     if(bfm_allocator::member!=x.bfm_allocator::member){
-
-#if defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
-      std::swap(bfm_allocator::member,x.bfm_allocator::member);
-#else
-      using std::swap;
-      swap(bfm_allocator::member,x.bfm_allocator::member);
-#endif
-
+      detail::adl_swap(bfm_allocator::member,x.bfm_allocator::member);
     }
     std::swap(bfm_header::member,x.bfm_header::member);
     super::swap_(x);
_______________________________________________
Boost-commit mailing list
Boost-commit@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-commit


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic