Ticket #8553: scoped_allocator.patch
File scoped_allocator.patch, 3.4 KB (added by , 9 years ago) |
---|
-
scoped_allocator.hpp.
old new 648 648 649 649 public: 650 650 651 void swap(scoped_allocator_adaptor_base& other) 652 { 653 container_detail::do_swap(outer_allocator(),other.outer_allocator()); 654 m_inner.swap(other.inner_allocator()); 655 } 656 651 657 scoped_allocator_adaptor_base &operator= 652 658 (BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other) 653 659 { … … 795 801 {} \ 796 802 \ 797 803 public: \ 804 void swap(scoped_allocator_adaptor_base& other) \ 805 { \ 806 container_detail::do_swap(outer_allocator(),other.outer_allocator()); \ 807 m_inner.swap(other.inner_allocator()); \ 808 } \ 809 \ 798 810 scoped_allocator_adaptor_base &operator= \ 799 811 (BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other) \ 800 812 { \ … … 916 928 {} 917 929 918 930 public: 931 void swap(scoped_allocator_adaptor_base& other) 932 { 933 container_detail::do_swap(outer_allocator(),other.outer_allocator()); 934 } 935 919 936 scoped_allocator_adaptor_base &operator=(BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other) 920 937 { 921 938 outer_allocator_type::operator=(other.outer_allocator()); … … 1142 1159 : base_type(::boost::move(other.base())) 1143 1160 {} 1144 1161 1162 void swap(scoped_allocator_adaptor& other) 1163 { 1164 base_type::swap(static_cast<base_type &>(other)); 1165 } 1166 1145 1167 scoped_allocator_adaptor &operator=(BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor) other) 1146 1168 { 1147 1169 base_type::operator=(static_cast<const base_type &>(other)); … … 1463 1485 return ! (a == b); 1464 1486 } 1465 1487 1488 template <typename OuterA1 1489 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) 1490 , typename... InnerAllocs 1491 #else 1492 BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS, class Q) 1493 #endif 1494 > 1495 inline void swap( 1496 scoped_allocator_adaptor<OuterA1 1497 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) 1498 ,InnerAllocs... 1499 #else 1500 BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS, Q) 1501 #endif 1502 >& a, 1503 scoped_allocator_adaptor<OuterA1 1504 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) 1505 ,InnerAllocs... 1506 #else 1507 BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS, Q) 1508 #endif 1509 >& b) 1510 { 1511 a.swap(b); 1512 } 1513 1466 1514 }} // namespace boost { namespace container { 1467 1515 1468 1516 #include <boost/container/detail/config_end.hpp>