diff options
Diffstat (limited to 'boost/container/detail/dispatch_uses_allocator.hpp')
-rw-r--r-- | boost/container/detail/dispatch_uses_allocator.hpp | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/boost/container/detail/dispatch_uses_allocator.hpp b/boost/container/detail/dispatch_uses_allocator.hpp index 946fdf615b..0b8cfea66c 100644 --- a/boost/container/detail/dispatch_uses_allocator.hpp +++ b/boost/container/detail/dispatch_uses_allocator.hpp @@ -35,7 +35,7 @@ namespace boost { namespace container { -namespace container_detail { +namespace dtl { // Check if we can detect is_convertible using advanced SFINAE expressions @@ -110,10 +110,10 @@ template < typename ConstructAlloc , typename T , class ...Args > -inline typename container_detail::enable_if_and +inline typename dtl::enable_if_and < void - , container_detail::is_not_pair<T> - , container_detail::not_< uses_allocator<T, ArgAlloc> > + , dtl::is_not_pair<T> + , dtl::not_< uses_allocator<T, ArgAlloc> > >::type dispatch_uses_allocator ( ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p, BOOST_FWD_REF(Args)...args) { @@ -127,9 +127,9 @@ template < typename ConstructAlloc , typename T , class ...Args > -inline typename container_detail::enable_if_and +inline typename dtl::enable_if_and < void - , container_detail::is_not_pair<T> + , dtl::is_not_pair<T> , uses_allocator<T, ArgAlloc> , is_constructible_with_allocator_prefix<T, ArgAlloc, Args...> >::type dispatch_uses_allocator @@ -146,11 +146,11 @@ template < typename ConstructAlloc , typename T , class ...Args > -inline typename container_detail::enable_if_and +inline typename dtl::enable_if_and < void - , container_detail::is_not_pair<T> + , dtl::is_not_pair<T> , uses_allocator<T, ArgAlloc> - , container_detail::not_<is_constructible_with_allocator_prefix<T, ArgAlloc, Args...> > + , dtl::not_<is_constructible_with_allocator_prefix<T, ArgAlloc, Args...> > >::type dispatch_uses_allocator ( ConstructAlloc& construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p, BOOST_FWD_REF(Args)...args) { @@ -162,10 +162,10 @@ inline typename container_detail::enable_if_and #define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \ template <typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\ - inline typename container_detail::enable_if_and\ + inline typename dtl::enable_if_and\ < void\ - , container_detail::is_not_pair<T>\ - , container_detail::not_<uses_allocator<T, ArgAlloc> >\ + , dtl::is_not_pair<T>\ + , dtl::not_<uses_allocator<T, ArgAlloc> >\ >::type\ dispatch_uses_allocator\ (ConstructAlloc &construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ @@ -179,9 +179,9 @@ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR #define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \ template < typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\ - inline typename container_detail::enable_if_and\ + inline typename dtl::enable_if_and\ < void\ - , container_detail::is_not_pair<T>\ + , dtl::is_not_pair<T>\ , uses_allocator<T, ArgAlloc>\ , is_constructible_with_allocator_prefix<T, ArgAlloc BOOST_MOVE_I##N BOOST_MOVE_TARG##N>\ >::type\ @@ -197,11 +197,11 @@ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR #define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \ template < typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\ - inline typename container_detail::enable_if_and\ + inline typename dtl::enable_if_and\ < void\ - , container_detail::is_not_pair<T>\ + , dtl::is_not_pair<T>\ , uses_allocator<T, ArgAlloc>\ - , container_detail::not_<is_constructible_with_allocator_prefix<T, ArgAlloc BOOST_MOVE_I##N BOOST_MOVE_TARG##N> >\ + , dtl::not_<is_constructible_with_allocator_prefix<T, ArgAlloc BOOST_MOVE_I##N BOOST_MOVE_TARG##N> >\ >::type\ dispatch_uses_allocator\ (ConstructAlloc& construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ @@ -219,18 +219,18 @@ template < typename ConstructAlloc , typename ArgAlloc , typename Pair > inline -BOOST_CONTAINER_DOC1ST(void, typename container_detail::enable_if<container_detail::is_pair<Pair> >::type) +BOOST_CONTAINER_DOC1ST(void, typename dtl::enable_if<dtl::is_pair<Pair> >::type) dispatch_uses_allocator ( ConstructAlloc & construct_alloc , BOOST_FWD_REF(ArgAlloc) arg_alloc , Pair* p) { - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(p->first)); + (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->first)); BOOST_TRY{ - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(p->second)); + (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->second)); } BOOST_CATCH(...) { - allocator_traits<ConstructAlloc>::destroy(construct_alloc, container_detail::addressof(p->first)); + allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(p->first)); BOOST_RETHROW } BOOST_CATCH_END @@ -240,18 +240,18 @@ BOOST_CONTAINER_DOC1ST(void, typename container_detail::enable_if<container_deta template < typename ConstructAlloc , typename ArgAlloc , class Pair, class U, class V> -BOOST_CONTAINER_DOC1ST(void, typename container_detail::enable_if<container_detail::is_pair<Pair> >::type) +BOOST_CONTAINER_DOC1ST(void, typename dtl::enable_if<dtl::is_pair<Pair> >::type) dispatch_uses_allocator ( ConstructAlloc & construct_alloc , BOOST_FWD_REF(ArgAlloc) arg_alloc , Pair* p, BOOST_FWD_REF(U) x, BOOST_FWD_REF(V) y) { - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(p->first), ::boost::forward<U>(x)); + (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->first), ::boost::forward<U>(x)); BOOST_TRY{ - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(p->second), ::boost::forward<V>(y)); + (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->second), ::boost::forward<V>(y)); } BOOST_CATCH(...){ - allocator_traits<ConstructAlloc>::destroy(construct_alloc, container_detail::addressof(p->first)); + allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(p->first)); BOOST_RETHROW } BOOST_CATCH_END @@ -260,7 +260,7 @@ BOOST_CONTAINER_DOC1ST(void, typename container_detail::enable_if<container_deta template < typename ConstructAlloc , typename ArgAlloc , class Pair, class Pair2> -BOOST_CONTAINER_DOC1ST(void, typename container_detail::enable_if< container_detail::is_pair<Pair> >::type) +BOOST_CONTAINER_DOC1ST(void, typename dtl::enable_if< dtl::is_pair<Pair> >::type) dispatch_uses_allocator (ConstructAlloc & construct_alloc , BOOST_FWD_REF(ArgAlloc) arg_alloc @@ -270,10 +270,10 @@ BOOST_CONTAINER_DOC1ST(void, typename container_detail::enable_if< container_det template < typename ConstructAlloc , typename ArgAlloc , class Pair, class Pair2> -typename container_detail::enable_if_and +typename dtl::enable_if_and < void - , container_detail::is_pair<Pair> - , container_detail::not_<boost::move_detail::is_reference<Pair2> > >::type //This is needed for MSVC10 and ambiguous overloads + , dtl::is_pair<Pair> + , dtl::not_<boost::move_detail::is_reference<Pair2> > >::type //This is needed for MSVC10 and ambiguous overloads dispatch_uses_allocator (ConstructAlloc & construct_alloc , BOOST_FWD_REF(ArgAlloc) arg_alloc @@ -286,20 +286,20 @@ typename container_detail::enable_if_and template< typename ConstructAlloc, typename ArgAlloc, class Pair \ , template<class, class, class, class, class, class, class, class, class, class> class BoostTuple \ BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \ -typename container_detail::enable_if< container_detail::is_pair<Pair> >::type\ +typename dtl::enable_if< dtl::is_pair<Pair> >::type\ dispatch_uses_allocator( ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* pair, piecewise_construct_t\ , BoostTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::boost::tuples::null_type)> p\ , BoostTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,M),::boost::tuples::null_type)> q)\ {\ (void)p; (void)q;\ (dispatch_uses_allocator)\ - (construct_alloc, arg_alloc, container_detail::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_TMPL_GET##N);\ + (construct_alloc, arg_alloc, dtl::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_TMPL_GET##N);\ BOOST_TRY{\ (dispatch_uses_allocator)\ - (construct_alloc, arg_alloc, container_detail::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_TMPL_GETQ##M);\ + (construct_alloc, arg_alloc, dtl::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_TMPL_GETQ##M);\ }\ BOOST_CATCH(...) {\ - allocator_traits<ConstructAlloc>::destroy(construct_alloc, container_detail::addressof(pair->first));\ + allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(pair->first));\ BOOST_RETHROW\ }\ BOOST_CATCH_END\ @@ -317,12 +317,12 @@ BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BO , Tuple<Args1...>& t1, Tuple<Args2...>& t2, index_tuple<Indexes1...>, index_tuple<Indexes2...>) { (void)t1; (void)t2; - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(pair->first), ::boost::forward<Args1>(get<Indexes1>(t1))...); + (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(pair->first), ::boost::forward<Args1>(get<Indexes1>(t1))...); BOOST_TRY{ - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(pair->second), ::boost::forward<Args2>(get<Indexes2>(t2))...); + (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(pair->second), ::boost::forward<Args2>(get<Indexes2>(t2))...); } BOOST_CATCH(...){ - allocator_traits<ConstructAlloc>::destroy(construct_alloc, container_detail::addressof(pair->first)); + allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(pair->first)); BOOST_RETHROW } BOOST_CATCH_END @@ -330,7 +330,7 @@ BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BO template< typename ConstructAlloc, typename ArgAlloc, class Pair , template<class ...> class Tuple, class... Args1, class... Args2> - typename container_detail::enable_if< container_detail::is_pair<Pair> >::type + typename dtl::enable_if< dtl::is_pair<Pair> >::type dispatch_uses_allocator( ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* pair, piecewise_construct_t , Tuple<Args1...> t1, Tuple<Args2...> t2) { @@ -346,20 +346,20 @@ BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BO template< typename ConstructAlloc, typename ArgAlloc, class Pair\ , template<class, class, class, class, class, class, class, class, class, class> class StdTuple\ BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \ - typename container_detail::enable_if< container_detail::is_pair<Pair> >::type\ + typename dtl::enable_if< dtl::is_pair<Pair> >::type\ dispatch_uses_allocator(ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* pair, piecewise_construct_t\ , StdTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::std::tr1::_Nil)> p\ , StdTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,M),::std::tr1::_Nil)> q)\ {\ (void)p; (void)q;\ (dispatch_uses_allocator)\ - (construct_alloc, arg_alloc, container_detail::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_GET_IDX##N);\ + (construct_alloc, arg_alloc, dtl::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_GET_IDX##N);\ BOOST_TRY{\ (dispatch_uses_allocator)\ - (construct_alloc, arg_alloc, container_detail::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_GET_IDXQ##M);\ + (construct_alloc, arg_alloc, dtl::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_GET_IDXQ##M);\ }\ BOOST_CATCH(...) {\ - allocator_traits<ConstructAlloc>::destroy(construct_alloc, container_detail::addressof(pair->first));\ + allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(pair->first));\ BOOST_RETHROW\ }\ BOOST_CATCH_END\ @@ -380,7 +380,7 @@ BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BO template< typename ConstructAlloc, typename ArgAlloc, class Pair\ , template<BOOST_MOVE_REPEAT(_VARIADIC_MAX, class), class, class, class> class StdTuple \ BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \ - typename container_detail::enable_if< container_detail::is_pair<Pair> >::type\ + typename dtl::enable_if< dtl::is_pair<Pair> >::type\ dispatch_uses_allocator\ ( ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* pair, piecewise_construct_t\ , StdTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(BOOST_MOVE_ADD(_VARIADIC_MAX, 3),N),::std::_Nil) > p\ @@ -388,13 +388,13 @@ BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BO {\ (void)p; (void)q;\ (dispatch_uses_allocator)\ - (construct_alloc, arg_alloc, container_detail::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_GET_IDX##N);\ + (construct_alloc, arg_alloc, dtl::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_GET_IDX##N);\ BOOST_TRY{\ (dispatch_uses_allocator)\ - (construct_alloc, arg_alloc, container_detail::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_GET_IDXQ##M);\ + (construct_alloc, arg_alloc, dtl::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_GET_IDXQ##M);\ }\ BOOST_CATCH(...) {\ - allocator_traits<ConstructAlloc>::destroy(construct_alloc, container_detail::addressof(pair->first));\ + allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(pair->first));\ BOOST_RETHROW\ }\ BOOST_CATCH_END\ @@ -411,16 +411,16 @@ BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BO template < typename ConstructAlloc , typename ArgAlloc , class Pair, class KeyType, class ... Args> -typename container_detail::enable_if< container_detail::is_pair<Pair>, void >::type +typename dtl::enable_if< dtl::is_pair<Pair>, void >::type dispatch_uses_allocator (ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* p, try_emplace_t, BOOST_FWD_REF(KeyType) k, BOOST_FWD_REF(Args) ...args) { - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(p->first), ::boost::forward<KeyType>(k)); + (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->first), ::boost::forward<KeyType>(k)); BOOST_TRY{ - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(p->second), ::boost::forward<Args>(args)...); + (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->second), ::boost::forward<Args>(args)...); } BOOST_CATCH(...) { - allocator_traits<ConstructAlloc>::destroy(construct_alloc, container_detail::addressof(p->first)); + allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(p->first)); BOOST_RETHROW } BOOST_CATCH_END @@ -430,18 +430,18 @@ typename container_detail::enable_if< container_detail::is_pair<Pair>, void >::t #define BOOST_CONTAINER_DISPATCH_USES_ALLOCATOR_PAIR_TRY_EMPLACE_CODE(N) \ template <typename ConstructAlloc, typename ArgAlloc, class Pair, class KeyType BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\ - inline typename container_detail::enable_if\ - < container_detail::is_pair<Pair>, void >::type\ + inline typename dtl::enable_if\ + < dtl::is_pair<Pair>, void >::type\ dispatch_uses_allocator\ (ConstructAlloc &construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* p, try_emplace_t, \ BOOST_FWD_REF(KeyType) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ {\ - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(p->first), ::boost::forward<KeyType>(k));\ + (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->first), ::boost::forward<KeyType>(k));\ BOOST_TRY{\ - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(p->second) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ + (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->second) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ }\ BOOST_CATCH(...) {\ - allocator_traits<ConstructAlloc>::destroy(construct_alloc, container_detail::addressof(p->first));\ + allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(p->first));\ BOOST_RETHROW\ }\ BOOST_CATCH_END\ @@ -452,7 +452,7 @@ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_DISPATCH_USES_ALLOCATOR_PAIR_TRY_EMPLACE #endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -} //namespace container_detail +} //namespace dtl }} // namespace boost { namespace container { |