Ticket #3985: config-interprocess.patch
File config-interprocess.patch, 16.9 KB (added by , 13 years ago) |
---|
-
boost/interprocess/detail/move.hpp
62 62 63 63 /// @endcond 64 64 65 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)65 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 66 66 67 67 //#define BOOST_MOVE_ASSIGN_FROM_NON_CONST_RVALUE 68 68 … … 273 273 } //namespace interprocess { 274 274 } //namespace boost 275 275 276 #else // BOOST_HAS_RVALUE_REFS276 #else // BOOST_NO_RVALUE_REFERENCES 277 277 278 278 #include <boost/type_traits/remove_reference.hpp> 279 279 … … 451 451 } //namespace interprocess { 452 452 } //namespace boost { 453 453 454 #endif // BOOST_HAS_RVALUE_REFS454 #endif // BOOST_NO_RVALUE_REFERENCES 455 455 456 456 namespace boost { 457 457 namespace interprocess { … … 473 473 public: 474 474 typedef It iterator_type; 475 475 typedef typename std::iterator_traits<iterator_type>::value_type value_type; 476 #if defined(BOOST_HAS_RVALUE_REFS) || defined(BOOST_MOVE_DOXYGEN_INVOKED)476 #if !defined(BOOST_NO_RVALUE_REFERENCES) || defined(BOOST_MOVE_DOXYGEN_INVOKED) 477 477 typedef value_type && reference; 478 478 #else 479 479 typedef typename ::boost::mpl::if_ … … 502 502 503 503 reference operator*() const 504 504 { 505 #if defined(BOOST_HAS_RVALUE_REFS)505 #if !defined(BOOST_NO_RVALUE_REFERENCES) 506 506 return *m_it; 507 507 #else 508 508 return ::boost::interprocess::move(*m_it); … … 538 538 539 539 reference operator[](difference_type n) const 540 540 { 541 #if defined(BOOST_HAS_RVALUE_REFS)541 #if !defined(BOOST_NO_RVALUE_REFERENCES) 542 542 return m_it[n]; 543 543 #else 544 544 return ::boost::interprocess::move(m_it[n]); -
boost/interprocess/detail/preprocessor.hpp
36 36 //This cast is ugly but it is necessary until "perfect forwarding" 37 37 //is achieved in C++0x. Meanwhile, if we want to be able to 38 38 //bind rvalues with non-const references, we have to be ugly 39 #if def BOOST_HAS_RVALUE_REFS39 #ifndef BOOST_NO_RVALUE_REFERENCES 40 40 #define BOOST_INTERPROCESS_PP_PARAM_LIST(z, n, data) \ 41 41 BOOST_PP_CAT(P, n) && BOOST_PP_CAT(p, n) \ 42 42 //! … … 46 46 //! 47 47 #endif 48 48 49 #if def BOOST_HAS_RVALUE_REFS49 #ifndef BOOST_NO_RVALUE_REFERENCES 50 50 #define BOOST_INTERPROCESS_PARAM(U, u) \ 51 51 U && u \ 52 52 //! … … 56 56 //! 57 57 #endif 58 58 59 #if def BOOST_HAS_RVALUE_REFS59 #ifndef BOOST_NO_RVALUE_REFERENCES 60 60 #define BOOST_INTERPROCESS_AUX_PARAM_INIT(z, n, data) \ 61 61 BOOST_PP_CAT(m_p, n) (BOOST_PP_CAT(p, n)) \ 62 62 //! … … 70 70 BOOST_PP_CAT(++m_p, n) \ 71 71 //! 72 72 73 #if def BOOST_HAS_RVALUE_REFS73 #ifndef BOOST_NO_RVALUE_REFERENCES 74 74 #define BOOST_INTERPROCESS_AUX_PARAM_DEFINE(z, n, data) \ 75 75 BOOST_PP_CAT(P, n) && BOOST_PP_CAT(m_p, n); \ 76 76 //! -
boost/interprocess/detail/workaround.hpp
115 115 116 116 #endif 117 117 118 #if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)\118 #if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)\ 119 119 && !defined(BOOST_INTERPROCESS_DISABLE_VARIADIC_TMPL) 120 120 #define BOOST_INTERPROCESS_PERFECT_FORWARDING 121 121 #endif -
boost/interprocess/containers/container/list.hpp
572 572 void push_front(insert_const_ref_type x) 573 573 { this->insert(this->cbegin(), x); } 574 574 575 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)575 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 576 576 void push_front(T &x) { push_front(const_cast<const T &>(x)); } 577 577 578 578 template<class U> … … 597 597 void push_back (insert_const_ref_type x) 598 598 { this->insert(this->cend(), x); } 599 599 600 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)600 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 601 601 void push_back(T &x) { push_back(const_cast<const T &>(x)); } 602 602 603 603 template<class U> … … 808 808 iterator insert(const_iterator position, insert_const_ref_type x) 809 809 { return this->priv_insert(position, x); } 810 810 811 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)811 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 812 812 iterator insert(const_iterator position, T &x) { return this->insert(position, const_cast<const T &>(x)); } 813 813 814 814 template<class U> -
boost/interprocess/containers/container/set.hpp
357 357 std::pair<iterator,bool> insert(insert_const_ref_type x) 358 358 { return priv_insert(x); } 359 359 360 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)360 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 361 361 std::pair<iterator,bool> insert(T &x) 362 362 { return this->insert(const_cast<const T &>(x)); } 363 363 … … 389 389 iterator insert(const_iterator p, insert_const_ref_type x) 390 390 { return priv_insert(p, x); } 391 391 392 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)392 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 393 393 iterator insert(const_iterator position, T &x) 394 394 { return this->insert(position, const_cast<const T &>(x)); } 395 395 … … 912 912 iterator insert(insert_const_ref_type x) 913 913 { return priv_insert(x); } 914 914 915 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)915 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 916 916 iterator insert(T &x) 917 917 { return this->insert(const_cast<const T &>(x)); } 918 918 … … 942 942 iterator insert(const_iterator p, insert_const_ref_type x) 943 943 { return priv_insert(p, x); } 944 944 945 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)945 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 946 946 iterator insert(const_iterator position, T &x) 947 947 { return this->insert(position, const_cast<const T &>(x)); } 948 948 -
boost/interprocess/containers/container/detail/workaround.hpp
13 13 14 14 #include <boost/interprocess/containers/container/detail/config_begin.hpp> 15 15 16 #if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)\16 #if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)\ 17 17 && !defined(BOOST_INTERPROCESS_DISABLE_VARIADIC_TMPL) 18 18 #define BOOST_CONTAINERS_PERFECT_FORWARDING 19 19 -
boost/interprocess/containers/container/detail/pair.hpp
100 100 101 101 template<class U> 102 102 pair( BOOST_CONTAINERS_PARAM(U, u) 103 #if ndef BOOST_HAS_RVALUE_REFS103 #ifdef BOOST_NO_RVALUE_REFERENCES 104 104 , typename containers_detail::disable_if 105 105 < containers_detail::is_same<U, ::boost::interprocess::rv<pair> > >::type* = 0 106 106 #endif -
boost/interprocess/containers/container/detail/tree.hpp
200 200 }; 201 201 202 202 }//namespace containers_detail { 203 #if !defined(BOOST_HAS_RVALUE_REFS)203 #if defined(BOOST_NO_RVALUE_REFERENCES) 204 204 template<class T, class VoidPointer> 205 205 struct has_own_construct_from_it 206 206 < boost::container::containers_detail::rbtree_node<T, VoidPointer> > -
boost/interprocess/containers/container/detail/algorithms.hpp
35 35 namespace boost { 36 36 namespace container { 37 37 38 #if !defined(BOOST_HAS_RVALUE_REFS)38 #if defined(BOOST_NO_RVALUE_REFERENCES) 39 39 template<class T> 40 40 struct has_own_construct_from_it 41 41 { -
boost/interprocess/containers/container/detail/preprocessor.hpp
36 36 //This cast is ugly but it is necessary until "perfect forwarding" 37 37 //is achieved in C++0x. Meanwhile, if we want to be able to 38 38 //bind rvalues with non-const references, we have to be ugly 39 #if def BOOST_HAS_RVALUE_REFS39 #ifndef BOOST_NO_RVALUE_REFERENCES 40 40 #define BOOST_CONTAINERS_PP_PARAM_LIST(z, n, data) \ 41 41 BOOST_PP_CAT(P, n) && BOOST_PP_CAT(p, n) \ 42 42 //! … … 46 46 //! 47 47 #endif 48 48 49 #if def BOOST_HAS_RVALUE_REFS49 #ifndef BOOST_NO_RVALUE_REFERENCES 50 50 #define BOOST_CONTAINERS_PARAM(U, u) \ 51 51 U && u \ 52 52 //! … … 56 56 //! 57 57 #endif 58 58 59 #if def BOOST_HAS_RVALUE_REFS59 #ifndef BOOST_NO_RVALUE_REFERENCES 60 60 #define BOOST_CONTAINERS_AUX_PARAM_INIT(z, n, data) \ 61 61 BOOST_PP_CAT(m_p, n) (BOOST_PP_CAT(p, n)) \ 62 62 //! … … 70 70 BOOST_PP_CAT(++m_p, n) \ 71 71 //! 72 72 73 #if def BOOST_HAS_RVALUE_REFS73 #ifndef BOOST_NO_RVALUE_REFERENCES 74 74 #define BOOST_CONTAINERS_AUX_PARAM_DEFINE(z, n, data) \ 75 75 BOOST_PP_CAT(P, n) && BOOST_PP_CAT(m_p, n); \ 76 76 //! -
boost/interprocess/containers/container/stable_vector.hpp
672 672 void push_back(insert_const_ref_type x) 673 673 { return priv_push_back(x); } 674 674 675 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)675 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 676 676 void push_back(T &x) { push_back(const_cast<const T &>(x)); } 677 677 678 678 template<class U> … … 689 689 iterator insert(const_iterator position, insert_const_ref_type x) 690 690 { return this->priv_insert(position, x); } 691 691 692 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)692 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 693 693 iterator insert(const_iterator position, T &x) { return this->insert(position, const_cast<const T &>(x)); } 694 694 695 695 template<class U> -
boost/interprocess/containers/container/slist.hpp
631 631 void push_front(insert_const_ref_type x) 632 632 { return priv_push_front(x); } 633 633 634 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)634 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 635 635 void push_front(T &x) { push_front(const_cast<const T &>(x)); } 636 636 637 637 template<class U> … … 692 692 iterator insert_after(const_iterator prev_pos, insert_const_ref_type x) 693 693 { return this->priv_insert_after(prev_pos, x); } 694 694 695 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)695 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 696 696 iterator insert_after(const_iterator position, T &x) 697 697 { return this->insert_after(position, const_cast<const T &>(x)); } 698 698 … … 760 760 iterator insert(const_iterator position, insert_const_ref_type x) 761 761 { return this->priv_insert(position, x); } 762 762 763 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)763 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 764 764 iterator insert(const_iterator position, T &x) 765 765 { return this->insert(position, const_cast<const T &>(x)); } 766 766 -
boost/interprocess/containers/container/flat_set.hpp
331 331 std::pair<iterator, bool> insert(insert_const_ref_type x) 332 332 { return priv_insert(x); } 333 333 334 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)334 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 335 335 std::pair<iterator, bool> insert(T &x) 336 336 { return this->insert(const_cast<const T &>(x)); } 337 337 … … 368 368 iterator insert(const_iterator p, insert_const_ref_type x) 369 369 { return priv_insert(p, x); } 370 370 371 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)371 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 372 372 iterator insert(const_iterator position, T &x) 373 373 { return this->insert(position, const_cast<const T &>(x)); } 374 374 … … 922 922 iterator insert(insert_const_ref_type x) 923 923 { return priv_insert(x); } 924 924 925 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)925 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 926 926 iterator insert(T &x) 927 927 { return this->insert(const_cast<const T &>(x)); } 928 928 … … 954 954 iterator insert(const_iterator p, insert_const_ref_type x) 955 955 { return priv_insert(p, x); } 956 956 957 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)957 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 958 958 iterator insert(const_iterator position, T &x) 959 959 { return this->insert(position, const_cast<const T &>(x)); } 960 960 -
boost/interprocess/containers/container/vector.hpp
903 903 void push_back(insert_const_ref_type x) 904 904 { return priv_push_back(x); } 905 905 906 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)906 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 907 907 void push_back(T &x) { push_back(const_cast<const T &>(x)); } 908 908 909 909 template<class U> … … 1062 1062 iterator insert(const_iterator position, insert_const_ref_type x) 1063 1063 { return this->priv_insert(position, x); } 1064 1064 1065 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)1065 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 1066 1066 iterator insert(const_iterator position, T &x) { return this->insert(position, const_cast<const T &>(x)); } 1067 1067 1068 1068 template<class U> -
boost/interprocess/containers/container/deque.hpp
697 697 this->priv_assign_dispatch(first, last, Result()); 698 698 } 699 699 700 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)700 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 701 701 void push_back(T &x) { push_back(const_cast<const T &>(x)); } 702 702 703 703 template<class U> … … 719 719 } 720 720 } 721 721 722 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)722 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 723 723 void push_front(T &x) { push_front(const_cast<const T &>(x)); } 724 724 725 725 template<class U> … … 761 761 this->priv_pop_front_aux(); 762 762 } 763 763 764 #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)764 #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) 765 765 iterator insert(const_iterator position, T &x) 766 766 { return this->insert(position, const_cast<const T &>(x)); } 767 767