From 22e74d279c7c73588e5c1c97e8f54381fd0308b3 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Tue, 20 Nov 2012 23:06:46 +0000 Subject: [PATCH] Remove usage of deprecated macros [SVN r81447] --- include/boost/container/allocator_traits.hpp | 6 +- include/boost/container/detail/pair.hpp | 2 +- .../boost/container/detail/preprocessor.hpp | 26 +++---- .../boost/container/detail/type_traits.hpp | 2 +- include/boost/container/detail/workaround.hpp | 6 +- include/boost/container/scoped_allocator.hpp | 72 +++++++++---------- .../boost/container/scoped_allocator_fwd.hpp | 6 +- 7 files changed, 60 insertions(+), 60 deletions(-) diff --git a/include/boost/container/allocator_traits.hpp b/include/boost/container/allocator_traits.hpp index 11d948b..b1c4e5e 100644 --- a/include/boost/container/allocator_traits.hpp +++ b/include/boost/container/allocator_traits.hpp @@ -165,11 +165,11 @@ struct allocator_traits propagate_on_container_swap, boost::false_type) propagate_on_container_swap; - #if !defined(BOOST_NO_TEMPLATE_ALIASES) + #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) //C++11 template using rebind_alloc = typename boost::intrusive::detail::type_rebinder::type; template using rebind_traits = allocator_traits< rebind_alloc >; - #else // #if !defined(BOOST_NO_TEMPLATE_ALIASES) + #else // #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) //Some workaround for C++03 or C++11 compilers with no template aliases template struct rebind_alloc : boost::intrusive::detail::type_rebinder::type @@ -196,7 +196,7 @@ struct allocator_traits struct rebind_traits : allocator_traits::type> {}; - #endif // #if !defined(BOOST_NO_TEMPLATE_ALIASES) + #endif // #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) template struct portable_rebind_alloc { typedef typename boost::intrusive::detail::type_rebinder::type type; }; diff --git a/include/boost/container/detail/pair.hpp b/include/boost/container/detail/pair.hpp index 2a20ed1..d5cd65a 100644 --- a/include/boost/container/detail/pair.hpp +++ b/include/boost/container/detail/pair.hpp @@ -336,7 +336,7 @@ struct is_class< ::boost::container::container_detail::pair > : public ::boost::true_type {}; -#ifdef BOOST_NO_RVALUE_REFERENCES +#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES template struct has_move_emulation_enabled< ::boost::container::container_detail::pair > diff --git a/include/boost/container/detail/preprocessor.hpp b/include/boost/container/detail/preprocessor.hpp index 5129ea1..599215f 100644 --- a/include/boost/container/detail/preprocessor.hpp +++ b/include/boost/container/detail/preprocessor.hpp @@ -47,7 +47,7 @@ //This cast is ugly but it is necessary until "perfect forwarding" //is achieved in C++0x. Meanwhile, if we want to be able to //bind rvalues with non-const references, we have to be ugly -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_CONTAINER_PP_PARAM_LIST(z, n, data) \ BOOST_PP_CAT(P, n) && BOOST_PP_CAT(p, n) \ //! @@ -55,13 +55,13 @@ #define BOOST_CONTAINER_PP_PARAM_LIST(z, n, data) \ const BOOST_PP_CAT(P, n) & BOOST_PP_CAT(p, n) \ //! -#endif //#ifndef BOOST_NO_RVALUE_REFERENCES +#endif //#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_CONTAINER_PP_CONST_REF_PARAM_LIST_Q(z, n, Data) \ const BOOST_PP_CAT(Q, n) & BOOST_PP_CAT(q, n) \ //! -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_CONTAINER_PP_PARAM(U, u) \ U && u \ //! @@ -69,22 +69,22 @@ const BOOST_PP_CAT(Q, n) & BOOST_PP_CAT(q, n) \ #define BOOST_CONTAINER_PP_PARAM(U, u) \ const U & u \ //! -#endif //#ifndef BOOST_NO_RVALUE_REFERENCES +#endif //#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_CONTAINER_PP_PARAM_INIT(z, n, data) \ BOOST_PP_CAT(m_p, n) (::boost::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(p, n) )) \ //! -#else //BOOST_NO_RVALUE_REFERENCES +#else //BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_CONTAINER_PP_PARAM_INIT(z, n, data) \ BOOST_PP_CAT(m_p, n) (const_cast(BOOST_PP_CAT(p, n))) \ //! -#endif //#ifndef BOOST_NO_RVALUE_REFERENCES +#endif //#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES #if defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG) @@ -160,25 +160,25 @@ const BOOST_PP_CAT(Q, n) & BOOST_PP_CAT(q, n) \ #endif //defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG) -#else //BOOST_NO_RVALUE_REFERENCES +#else //BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_CONTAINER_PP_PARAM_DEFINE(z, n, data) \ BOOST_PP_CAT(P, n) & BOOST_PP_CAT(m_p, n); \ //! -#endif //#ifndef BOOST_NO_RVALUE_REFERENCES +#endif //#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES -#if !defined(BOOST_NO_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG) #define BOOST_CONTAINER_PP_MEMBER_FORWARD(z, n, data) BOOST_PP_CAT(this->m_p, n).get() \ //! -#else //!defined(BOOST_NO_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG) +#else //!defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG) #define BOOST_CONTAINER_PP_MEMBER_FORWARD(z, n, data) \ ::boost::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(this->m_p, n) ) \ //! -#endif //!defined(BOOST_NO_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG) +#endif //!defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG) #define BOOST_CONTAINER_PP_PARAM_INC(z, n, data) \ BOOST_PP_CAT(++this->m_p, n) \ diff --git a/include/boost/container/detail/type_traits.hpp b/include/boost/container/detail/type_traits.hpp index 0e096e5..c1de447 100644 --- a/include/boost/container/detail/type_traits.hpp +++ b/include/boost/container/detail/type_traits.hpp @@ -90,7 +90,7 @@ struct remove_reference typedef T type; }; -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template struct remove_reference diff --git a/include/boost/container/detail/workaround.hpp b/include/boost/container/detail/workaround.hpp index 7838a5d..317bbb2 100644 --- a/include/boost/container/detail/workaround.hpp +++ b/include/boost/container/detail/workaround.hpp @@ -13,12 +13,12 @@ #include -#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)\ +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)\ && !defined(BOOST_INTERPROCESS_DISABLE_VARIADIC_TMPL) #define BOOST_CONTAINER_PERFECT_FORWARDING #endif -#if defined(BOOST_NO_NOEXCEPT) +#if defined(BOOST_NO_CXX11_NOEXCEPT) #define BOOST_CONTAINER_NOEXCEPT #define BOOST_CONTAINER_NOEXCEPT_IF(x) #else @@ -26,7 +26,7 @@ #define BOOST_CONTAINER_NOEXCEPT_IF(x) noexcept(x) #endif -#if !defined(BOOST_NO_VARIADIC_TEMPLATES) && defined(__GXX_EXPERIMENTAL_CXX0X__)\ +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && defined(__GXX_EXPERIMENTAL_CXX0X__)\ && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40700) #define BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST #endif diff --git a/include/boost/container/scoped_allocator.hpp b/include/boost/container/scoped_allocator.hpp index 5111d37..c49c3cf 100644 --- a/include/boost/container/scoped_allocator.hpp +++ b/include/boost/container/scoped_allocator.hpp @@ -259,7 +259,7 @@ namespace container_detail { //! Thanks Mathias! //With variadic templates, we need a single class to implement the trait - #if !defined(BOOST_NO_VARIADIC_TEMPLATES) + #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template struct is_constructible_impl @@ -290,7 +290,7 @@ namespace container_detail { : is_constructible {}; - #else // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) + #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) //Without variadic templates, we need to use de preprocessor to generate //some specializations. @@ -382,14 +382,14 @@ namespace container_detail { > {};*/ - #endif // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) + #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #else // #if !defined(BOOST_NO_SFINAE_EXPR) //Without advanced SFINAE expressions, we can't use is_constructible //so backup to constructible_with_allocator_xxx - #if !defined(BOOST_NO_VARIADIC_TEMPLATES) + #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template < class T, class InnerAlloc, class ...Args> struct is_constructible_with_allocator_prefix @@ -401,7 +401,7 @@ namespace container_detail { : constructible_with_allocator_suffix {};*/ - #else // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) + #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template < class T , class InnerAlloc @@ -423,11 +423,11 @@ namespace container_detail { : constructible_with_allocator_suffix {};*/ - #endif // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) + #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #endif // #if !defined(BOOST_NO_SFINAE_EXPR) -#if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template < typename OutermostAlloc , typename InnerAlloc @@ -489,7 +489,7 @@ inline void dispatch_uses_allocator (outermost_alloc, p, ::boost::forward(args)...); } -#else //#if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#else //#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #define BOOST_PP_LOCAL_MACRO(n) \ template < typename OutermostAlloc \ @@ -564,9 +564,9 @@ inline void dispatch_uses_allocator(boost::false_type uses_allocator #define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS) #include BOOST_PP_LOCAL_ITERATE() -#endif //#if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#endif //#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template class scoped_allocator_adaptor_base @@ -679,7 +679,7 @@ class scoped_allocator_adaptor_base inner_allocator_type m_inner; }; -#else //#if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#else //#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) //Let's add a dummy first template parameter to allow creating //specializations up to maximum InnerAlloc count @@ -829,13 +829,13 @@ class scoped_allocator_adaptor_base class scoped_allocator_adaptor_base < OuterAlloc - #if defined(BOOST_NO_VARIADIC_TEMPLATES) + #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) , true BOOST_PP_ENUM_TRAILING(BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS, BOOST_CONTAINER_PP_IDENTITY, nat) #endif @@ -850,7 +850,7 @@ class scoped_allocator_adaptor_base { typedef scoped_allocator_adaptor_base ::template portable_rebind_alloc::type - #if defined(BOOST_NO_VARIADIC_TEMPLATES) + #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) , true BOOST_PP_ENUM_TRAILING(BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS, BOOST_CONTAINER_PP_IDENTITY, container_detail::nat) #endif @@ -887,7 +887,7 @@ class scoped_allocator_adaptor_base scoped_allocator_adaptor_base (const scoped_allocator_adaptor_base< OuterA2 - #if defined(BOOST_NO_VARIADIC_TEMPLATES) + #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) , true BOOST_PP_ENUM_TRAILING(BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS, BOOST_CONTAINER_PP_IDENTITY, container_detail::nat) #endif @@ -899,7 +899,7 @@ class scoped_allocator_adaptor_base scoped_allocator_adaptor_base (BOOST_RV_REF_BEG scoped_allocator_adaptor_base< OuterA2 - #if defined(BOOST_NO_VARIADIC_TEMPLATES) + #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) , true BOOST_PP_ENUM_TRAILING(BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS, BOOST_CONTAINER_PP_IDENTITY, container_detail::nat) #endif @@ -946,7 +946,7 @@ class scoped_allocator_adaptor_base ///@endcond //Scoped allocator -#if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) #if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST) @@ -992,7 +992,7 @@ class scoped_allocator_adaptor_base #endif // #if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST) -#else // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) +#else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) template ::type - #if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) + #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) , InnerAllocs... #else BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS, Q) @@ -1086,7 +1086,7 @@ class scoped_allocator_adaptor : base_type(::boost::move(other.base())) {} - #if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) + #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) //! Requires: OuterAlloc shall be constructible from OuterA2. //! @@ -1097,7 +1097,7 @@ class scoped_allocator_adaptor scoped_allocator_adaptor(BOOST_FWD_REF(OuterA2) outerAlloc, const InnerAllocs & ...innerAllocs) : base_type(::boost::forward(outerAlloc), innerAllocs...) {} - #else // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) + #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) #define BOOST_PP_LOCAL_MACRO(n) \ template \ @@ -1111,14 +1111,14 @@ class scoped_allocator_adaptor #define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS) #include BOOST_PP_LOCAL_ITERATE() - #endif // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) + #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) //! Requires: OuterAlloc shall be constructible from OuterA2. //! //! Effects: initializes each allocator within the adaptor with the corresponding allocator from other. template scoped_allocator_adaptor(const scoped_allocator_adaptor scoped_allocator_adaptor(BOOST_RV_REF_BEG scoped_allocator_adaptorEffects: //! 1) If `uses_allocator::value` is false calls @@ -1274,7 +1274,7 @@ class scoped_allocator_adaptor , p, ::boost::forward(args)...); } - #else // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) + #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) //Disable this overload if the first argument is pair as some compilers have //overload selection problems when the first parameter is a pair. @@ -1295,7 +1295,7 @@ class scoped_allocator_adaptor #define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS) #include BOOST_PP_LOCAL_ITERATE() - #endif // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) + #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) template void construct(std::pair* p) @@ -1399,7 +1399,7 @@ class scoped_allocator_adaptor }; template inline bool operator==( const scoped_allocator_adaptor& a, const scoped_allocator_adaptor& b) { - #if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) + #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) const bool has_zero_inner = sizeof...(InnerAllocs) == 0u; #else const bool has_zero_inner = @@ -1434,7 +1434,7 @@ inline bool operator==( } template inline bool operator!=( const scoped_allocator_adaptor& a, const scoped_allocator_adaptor #include -#if defined(BOOST_NO_VARIADIC_TEMPLATES) +#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #include #include #endif @@ -27,7 +27,7 @@ namespace boost { namespace container { ///@cond -#if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST) @@ -45,7 +45,7 @@ namespace boost { namespace container { #endif // #if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST) -#else // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template