From cb732a22bec165eb5ef1921a7ecd48639d79008e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Mon, 26 Jan 2015 00:14:35 +0100 Subject: [PATCH] Replace BOOST_MOVE_IMPDEF with BOOST_CONTAINER_IMPDEF --- include/boost/container/allocator_traits.hpp | 11 ++++++-- include/boost/container/deque.hpp | 10 +++---- include/boost/container/detail/workaround.hpp | 2 +- include/boost/container/flat_map.hpp | 28 +++++++++---------- include/boost/container/list.hpp | 10 +++---- include/boost/container/map.hpp | 28 +++++++++---------- include/boost/container/new_allocator.hpp | 13 ++++++--- include/boost/container/scoped_allocator.hpp | 8 +++--- include/boost/container/set.hpp | 20 ++++++------- include/boost/container/slist.hpp | 6 ++-- include/boost/container/stable_vector.hpp | 8 +++--- include/boost/container/string.hpp | 10 +++---- include/boost/container/vector.hpp | 12 ++++---- 13 files changed, 88 insertions(+), 78 deletions(-) diff --git a/include/boost/container/allocator_traits.hpp b/include/boost/container/allocator_traits.hpp index f99d11d..9d5fe63 100644 --- a/include/boost/container/allocator_traits.hpp +++ b/include/boost/container/allocator_traits.hpp @@ -41,6 +41,8 @@ #include #endif +#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME allocate #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace container_detail { #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}} @@ -62,16 +64,19 @@ #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 9 #include +#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + namespace boost { namespace container { + +#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + namespace allocator_traits_detail { BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_max_size, max_size) BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_select_on_container_copy_construction, select_on_container_copy_construction) -} - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED +} //namespace allocator_traits_detail { namespace container_detail { diff --git a/include/boost/container/deque.hpp b/include/boost/container/deque.hpp index dce2720..3ec9ac8 100644 --- a/include/boost/container/deque.hpp +++ b/include/boost/container/deque.hpp @@ -502,11 +502,11 @@ class deque : protected deque_base typedef typename ::boost::container::allocator_traits::size_type size_type; typedef typename ::boost::container::allocator_traits::difference_type difference_type; typedef Allocator allocator_type; - typedef BOOST_MOVE_IMPDEF(allocator_type) stored_allocator_type; - typedef BOOST_MOVE_IMPDEF(typename Base::iterator) iterator; - typedef BOOST_MOVE_IMPDEF(typename Base::const_iterator) const_iterator; - typedef BOOST_MOVE_IMPDEF(boost::container::reverse_iterator) reverse_iterator; - typedef BOOST_MOVE_IMPDEF(boost::container::reverse_iterator) const_reverse_iterator; + typedef BOOST_CONTAINER_IMPDEF(allocator_type) stored_allocator_type; + typedef BOOST_CONTAINER_IMPDEF(typename Base::iterator) iterator; + typedef BOOST_CONTAINER_IMPDEF(typename Base::const_iterator) const_iterator; + typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) reverse_iterator; + typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) const_reverse_iterator; #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED diff --git a/include/boost/container/detail/workaround.hpp b/include/boost/container/detail/workaround.hpp index 2bb6f77..460ed31 100644 --- a/include/boost/container/detail/workaround.hpp +++ b/include/boost/container/detail/workaround.hpp @@ -46,7 +46,7 @@ #endif //Macros for documentation purposes. For code, expands to the argument -#define BOOST_MOVE_IMPDEF(TYPE) TYPE +#define BOOST_CONTAINER_IMPDEF(TYPE) TYPE #define BOOST_CONTAINER_SEEDOC(TYPE) TYPE //Macros for memset optimization. In most platforms diff --git a/include/boost/container/flat_map.hpp b/include/boost/container/flat_map.hpp index c54ba59..2107fe0 100644 --- a/include/boost/container/flat_map.hpp +++ b/include/boost/container/flat_map.hpp @@ -157,14 +157,14 @@ class flat_map typedef typename boost::container::allocator_traits::size_type size_type; typedef typename boost::container::allocator_traits::difference_type difference_type; typedef Allocator allocator_type; - typedef BOOST_MOVE_IMPDEF(Allocator) stored_allocator_type; - typedef BOOST_MOVE_IMPDEF(value_compare_impl) value_compare; + typedef BOOST_CONTAINER_IMPDEF(Allocator) stored_allocator_type; + typedef BOOST_CONTAINER_IMPDEF(value_compare_impl) value_compare; typedef Compare key_compare; - typedef BOOST_MOVE_IMPDEF(iterator_impl) iterator; - typedef BOOST_MOVE_IMPDEF(const_iterator_impl) const_iterator; - typedef BOOST_MOVE_IMPDEF(reverse_iterator_impl) reverse_iterator; - typedef BOOST_MOVE_IMPDEF(const_reverse_iterator_impl) const_reverse_iterator; - typedef BOOST_MOVE_IMPDEF(impl_value_type) movable_value_type; + typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator; + typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator; + typedef BOOST_CONTAINER_IMPDEF(reverse_iterator_impl) reverse_iterator; + typedef BOOST_CONTAINER_IMPDEF(const_reverse_iterator_impl) const_reverse_iterator; + typedef BOOST_CONTAINER_IMPDEF(impl_value_type) movable_value_type; public: ////////////////////////////////////////////// @@ -1152,14 +1152,14 @@ class flat_multimap typedef typename boost::container::allocator_traits::size_type size_type; typedef typename boost::container::allocator_traits::difference_type difference_type; typedef Allocator allocator_type; - typedef BOOST_MOVE_IMPDEF(Allocator) stored_allocator_type; - typedef BOOST_MOVE_IMPDEF(value_compare_impl) value_compare; + typedef BOOST_CONTAINER_IMPDEF(Allocator) stored_allocator_type; + typedef BOOST_CONTAINER_IMPDEF(value_compare_impl) value_compare; typedef Compare key_compare; - typedef BOOST_MOVE_IMPDEF(iterator_impl) iterator; - typedef BOOST_MOVE_IMPDEF(const_iterator_impl) const_iterator; - typedef BOOST_MOVE_IMPDEF(reverse_iterator_impl) reverse_iterator; - typedef BOOST_MOVE_IMPDEF(const_reverse_iterator_impl) const_reverse_iterator; - typedef BOOST_MOVE_IMPDEF(impl_value_type) movable_value_type; + typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator; + typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator; + typedef BOOST_CONTAINER_IMPDEF(reverse_iterator_impl) reverse_iterator; + typedef BOOST_CONTAINER_IMPDEF(const_reverse_iterator_impl) const_reverse_iterator; + typedef BOOST_CONTAINER_IMPDEF(impl_value_type) movable_value_type; ////////////////////////////////////////////// // diff --git a/include/boost/container/list.hpp b/include/boost/container/list.hpp index 2bd5e94..1387d75 100644 --- a/include/boost/container/list.hpp +++ b/include/boost/container/list.hpp @@ -167,11 +167,11 @@ class list typedef typename ::boost::container::allocator_traits::size_type size_type; typedef typename ::boost::container::allocator_traits::difference_type difference_type; typedef Allocator allocator_type; - typedef BOOST_MOVE_IMPDEF(NodeAlloc) stored_allocator_type; - typedef BOOST_MOVE_IMPDEF(iterator_impl) iterator; - typedef BOOST_MOVE_IMPDEF(const_iterator_impl) const_iterator; - typedef BOOST_MOVE_IMPDEF(boost::container::reverse_iterator) reverse_iterator; - typedef BOOST_MOVE_IMPDEF(boost::container::reverse_iterator) const_reverse_iterator; + typedef BOOST_CONTAINER_IMPDEF(NodeAlloc) stored_allocator_type; + typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator; + typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator; + typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) reverse_iterator; + typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) const_reverse_iterator; ////////////////////////////////////////////// // diff --git a/include/boost/container/map.hpp b/include/boost/container/map.hpp index 3df1df5..255cc59 100644 --- a/include/boost/container/map.hpp +++ b/include/boost/container/map.hpp @@ -109,15 +109,15 @@ class map typedef typename boost::container::allocator_traits::size_type size_type; typedef typename boost::container::allocator_traits::difference_type difference_type; typedef Allocator allocator_type; - typedef typename BOOST_MOVE_IMPDEF(base_t::stored_allocator_type) stored_allocator_type; - typedef BOOST_MOVE_IMPDEF(value_compare_impl) value_compare; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::stored_allocator_type) stored_allocator_type; + typedef BOOST_CONTAINER_IMPDEF(value_compare_impl) value_compare; typedef Compare key_compare; - typedef typename BOOST_MOVE_IMPDEF(base_t::iterator) iterator; - typedef typename BOOST_MOVE_IMPDEF(base_t::const_iterator) const_iterator; - typedef typename BOOST_MOVE_IMPDEF(base_t::reverse_iterator) reverse_iterator; - typedef typename BOOST_MOVE_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::iterator) iterator; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator; typedef std::pair nonconst_value_type; - typedef BOOST_MOVE_IMPDEF(movable_value_type_impl) movable_value_type; + typedef BOOST_CONTAINER_IMPDEF(movable_value_type_impl) movable_value_type; ////////////////////////////////////////////// // @@ -917,15 +917,15 @@ class multimap typedef typename boost::container::allocator_traits::size_type size_type; typedef typename boost::container::allocator_traits::difference_type difference_type; typedef Allocator allocator_type; - typedef typename BOOST_MOVE_IMPDEF(base_t::stored_allocator_type) stored_allocator_type; - typedef BOOST_MOVE_IMPDEF(value_compare_impl) value_compare; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::stored_allocator_type) stored_allocator_type; + typedef BOOST_CONTAINER_IMPDEF(value_compare_impl) value_compare; typedef Compare key_compare; - typedef typename BOOST_MOVE_IMPDEF(base_t::iterator) iterator; - typedef typename BOOST_MOVE_IMPDEF(base_t::const_iterator) const_iterator; - typedef typename BOOST_MOVE_IMPDEF(base_t::reverse_iterator) reverse_iterator; - typedef typename BOOST_MOVE_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::iterator) iterator; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator; typedef std::pair nonconst_value_type; - typedef BOOST_MOVE_IMPDEF(movable_value_type_impl) movable_value_type; + typedef BOOST_CONTAINER_IMPDEF(movable_value_type_impl) movable_value_type; ////////////////////////////////////////////// // diff --git a/include/boost/container/new_allocator.hpp b/include/boost/container/new_allocator.hpp index 54980d1..82f04aa 100644 --- a/include/boost/container/new_allocator.hpp +++ b/include/boost/container/new_allocator.hpp @@ -32,6 +32,7 @@ struct new_allocator_bool template class new_allocator; +//! Specialization of new_allocator for void types template<> class new_allocator { @@ -39,8 +40,10 @@ class new_allocator typedef void value_type; typedef void * pointer; typedef const void* const_pointer; - typedef new_allocator_bool propagate_on_container_move_assignment; - typedef new_allocator_bool is_always_equal; + //!A integral constant of type bool with value true + typedef BOOST_CONTAINER_IMPDEF(new_allocator_bool) propagate_on_container_move_assignment; + //!A integral constant of type bool with value true + typedef BOOST_CONTAINER_IMPDEF(new_allocator_bool) is_always_equal; // reference-to-void members are impossible //!Obtains an new_allocator that allocates @@ -96,8 +99,10 @@ class new_allocator typedef const T & const_reference; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; - typedef new_allocator_bool propagate_on_container_move_assignment; - typedef new_allocator_bool is_always_equal; + //!A integral constant of type bool with value true + typedef BOOST_CONTAINER_IMPDEF(new_allocator_bool) propagate_on_container_move_assignment; + //!A integral constant of type bool with value true + typedef BOOST_CONTAINER_IMPDEF(new_allocator_bool) is_always_equal; //!Obtains an new_allocator that allocates //!objects of type T2 diff --git a/include/boost/container/scoped_allocator.hpp b/include/boost/container/scoped_allocator.hpp index 2f2470e..f4c1cc4 100644 --- a/include/boost/container/scoped_allocator.hpp +++ b/include/boost/container/scoped_allocator.hpp @@ -923,24 +923,24 @@ class scoped_allocator_adaptor typedef typename outer_traits_type::void_pointer void_pointer; typedef typename outer_traits_type::const_void_pointer const_void_pointer; //! Type: A type with a constant boolean value == true if - //!allocator_traits::propagate_on_container_copy_assignment::value is + //!`allocator_traits::propagate_on_container_copy_assignment::value` is //! true for any Allocator in the set of OuterAlloc and InnerAllocs..., false otherwise. typedef typename base_type:: propagate_on_container_copy_assignment propagate_on_container_copy_assignment; //! Type: A type with a constant boolean value == true if - //!allocator_traits::propagate_on_container_move_assignment::value is + //!`allocator_traits::propagate_on_container_move_assignment::value` is //! true for any Allocator in the set of OuterAlloc and InnerAllocs..., false otherwise. typedef typename base_type:: propagate_on_container_move_assignment propagate_on_container_move_assignment; //! Type: A type with a constant boolean value == true if - //!allocator_traits::propagate_on_container_swap::value is + //! `allocator_traits::propagate_on_container_swap::value` is //! true for any Allocator in the set of OuterAlloc and InnerAllocs..., false otherwise. typedef typename base_type:: propagate_on_container_swap propagate_on_container_swap; //! Type: A type with a constant boolean value == true if - //!allocator_traits::is_always_equal::value is + //!`allocator_traits::is_always_equal::value` is //! true for all Allocator in the set of OuterAlloc and InnerAllocs..., false otherwise. typedef typename base_type:: is_always_equal is_always_equal; diff --git a/include/boost/container/set.hpp b/include/boost/container/set.hpp index 8160530..bfa2a62 100644 --- a/include/boost/container/set.hpp +++ b/include/boost/container/set.hpp @@ -91,11 +91,11 @@ class set typedef typename ::boost::container::allocator_traits::size_type size_type; typedef typename ::boost::container::allocator_traits::difference_type difference_type; typedef Allocator allocator_type; - typedef typename BOOST_MOVE_IMPDEF(base_t::stored_allocator_type) stored_allocator_type; - typedef typename BOOST_MOVE_IMPDEF(base_t::iterator) iterator; - typedef typename BOOST_MOVE_IMPDEF(base_t::const_iterator) const_iterator; - typedef typename BOOST_MOVE_IMPDEF(base_t::reverse_iterator) reverse_iterator; - typedef typename BOOST_MOVE_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::stored_allocator_type) stored_allocator_type; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::iterator) iterator; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator; ////////////////////////////////////////////// // @@ -747,11 +747,11 @@ class multiset typedef typename ::boost::container::allocator_traits::size_type size_type; typedef typename ::boost::container::allocator_traits::difference_type difference_type; typedef Allocator allocator_type; - typedef typename BOOST_MOVE_IMPDEF(base_t::stored_allocator_type) stored_allocator_type; - typedef typename BOOST_MOVE_IMPDEF(base_t::iterator) iterator; - typedef typename BOOST_MOVE_IMPDEF(base_t::const_iterator) const_iterator; - typedef typename BOOST_MOVE_IMPDEF(base_t::reverse_iterator) reverse_iterator; - typedef typename BOOST_MOVE_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::stored_allocator_type) stored_allocator_type; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::iterator) iterator; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator; + typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator; ////////////////////////////////////////////// // diff --git a/include/boost/container/slist.hpp b/include/boost/container/slist.hpp index fb24bc9..8fa6dd4 100644 --- a/include/boost/container/slist.hpp +++ b/include/boost/container/slist.hpp @@ -195,9 +195,9 @@ class slist typedef typename ::boost::container::allocator_traits::size_type size_type; typedef typename ::boost::container::allocator_traits::difference_type difference_type; typedef Allocator allocator_type; - typedef BOOST_MOVE_IMPDEF(NodeAlloc) stored_allocator_type; - typedef BOOST_MOVE_IMPDEF(iterator_impl) iterator; - typedef BOOST_MOVE_IMPDEF(const_iterator_impl) const_iterator; + typedef BOOST_CONTAINER_IMPDEF(NodeAlloc) stored_allocator_type; + typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator; + typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator; public: diff --git a/include/boost/container/stable_vector.hpp b/include/boost/container/stable_vector.hpp index 8cda00c..fb9696e 100644 --- a/include/boost/container/stable_vector.hpp +++ b/include/boost/container/stable_vector.hpp @@ -507,10 +507,10 @@ class stable_vector typedef typename ::boost::container::allocator_traits::difference_type difference_type; typedef Allocator allocator_type; typedef node_allocator_type stored_allocator_type; - typedef BOOST_MOVE_IMPDEF(iterator_impl) iterator; - typedef BOOST_MOVE_IMPDEF(const_iterator_impl) const_iterator; - typedef BOOST_MOVE_IMPDEF(boost::container::reverse_iterator) reverse_iterator; - typedef BOOST_MOVE_IMPDEF(boost::container::reverse_iterator) const_reverse_iterator; + typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator; + typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator; + typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) reverse_iterator; + typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) const_reverse_iterator; #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED private: diff --git a/include/boost/container/string.hpp b/include/boost/container/string.hpp index c2edf44..fe9bb7b 100644 --- a/include/boost/container/string.hpp +++ b/include/boost/container/string.hpp @@ -542,11 +542,11 @@ class basic_string typedef typename ::boost::container::allocator_traits::size_type size_type; typedef typename ::boost::container::allocator_traits::difference_type difference_type; typedef Allocator allocator_type; - typedef BOOST_MOVE_IMPDEF(allocator_type) stored_allocator_type; - typedef BOOST_MOVE_IMPDEF(pointer) iterator; - typedef BOOST_MOVE_IMPDEF(const_pointer) const_iterator; - typedef BOOST_MOVE_IMPDEF(boost::container::reverse_iterator) reverse_iterator; - typedef BOOST_MOVE_IMPDEF(boost::container::reverse_iterator) const_reverse_iterator; + typedef BOOST_CONTAINER_IMPDEF(allocator_type) stored_allocator_type; + typedef BOOST_CONTAINER_IMPDEF(pointer) iterator; + typedef BOOST_CONTAINER_IMPDEF(const_pointer) const_iterator; + typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) reverse_iterator; + typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) const_reverse_iterator; static const size_type npos = size_type(-1); #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED diff --git a/include/boost/container/vector.hpp b/include/boost/container/vector.hpp index d207a57..2f57970 100644 --- a/include/boost/container/vector.hpp +++ b/include/boost/container/vector.hpp @@ -601,14 +601,14 @@ class vector typedef Allocator allocator_type; typedef Allocator stored_allocator_type; #if defined BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER - typedef BOOST_MOVE_IMPDEF(pointer) iterator; - typedef BOOST_MOVE_IMPDEF(const_pointer) const_iterator; + typedef BOOST_CONTAINER_IMPDEF(pointer) iterator; + typedef BOOST_CONTAINER_IMPDEF(const_pointer) const_iterator; #else - typedef BOOST_MOVE_IMPDEF(iterator_impl) iterator; - typedef BOOST_MOVE_IMPDEF(const_iterator_impl) const_iterator; + typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator; + typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator; #endif - typedef BOOST_MOVE_IMPDEF(boost::container::reverse_iterator) reverse_iterator; - typedef BOOST_MOVE_IMPDEF(boost::container::reverse_iterator) const_reverse_iterator; + typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) reverse_iterator; + typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) const_reverse_iterator; #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED private: