Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:30:29

0001 /*
0002 Copyright 2020-2022 Glen Joseph Fernandes
0003 (glenjofe@gmail.com)
0004 
0005 Distributed under the Boost Software License, Version 1.0.
0006 (http://www.boost.org/LICENSE_1_0.txt)
0007 */
0008 #ifndef BOOST_CORE_ALLOCATOR_ACCESS_HPP
0009 #define BOOST_CORE_ALLOCATOR_ACCESS_HPP
0010 
0011 #include <boost/config.hpp>
0012 #include <boost/core/pointer_traits.hpp>
0013 #include <limits>
0014 #include <new>
0015 #if !defined(BOOST_NO_CXX11_ALLOCATOR)
0016 #include <type_traits>
0017 #endif
0018 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
0019 #include <utility>
0020 #endif
0021 
0022 #if defined(BOOST_GCC_VERSION) && (BOOST_GCC_VERSION >= 40300)
0023 #define BOOST_DETAIL_ALLOC_EMPTY(T) __is_empty(T)
0024 #elif defined(BOOST_INTEL) && defined(_MSC_VER) && (_MSC_VER >= 1500)
0025 #define BOOST_DETAIL_ALLOC_EMPTY(T) __is_empty(T)
0026 #elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1400)
0027 #define BOOST_DETAIL_ALLOC_EMPTY(T) __is_empty(T)
0028 #elif defined(BOOST_CLANG) && !defined(__CUDACC__)
0029 #if __has_feature(is_empty)
0030 #define BOOST_DETAIL_ALLOC_EMPTY(T) __is_empty(T)
0031 #endif
0032 #elif defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130)
0033 #define BOOST_DETAIL_ALLOC_EMPTY(T) __oracle_is_empty(T)
0034 #elif defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600)
0035 #define BOOST_DETAIL_ALLOC_EMPTY(T) __is_empty(T)
0036 #elif defined(BOOST_CODEGEARC)
0037 #define BOOST_DETAIL_ALLOC_EMPTY(T) __is_empty(T)
0038 #endif
0039 
0040 #if defined(_LIBCPP_SUPPRESS_DEPRECATED_PUSH)
0041 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
0042 #endif
0043 #if defined(_STL_DISABLE_DEPRECATED_WARNING)
0044 _STL_DISABLE_DEPRECATED_WARNING
0045 #endif
0046 #if defined(_MSC_VER)
0047 #pragma warning(push)
0048 #pragma warning(disable:4996)
0049 #endif
0050 
0051 namespace boost {
0052 
0053 template<class A>
0054 struct allocator_value_type {
0055     typedef typename A::value_type type;
0056 };
0057 
0058 namespace detail {
0059 
0060 template<class A, class = void>
0061 struct alloc_ptr {
0062     typedef typename boost::allocator_value_type<A>::type* type;
0063 };
0064 
0065 template<class>
0066 struct alloc_void {
0067     typedef void type;
0068 };
0069 
0070 template<class A>
0071 struct alloc_ptr<A,
0072     typename alloc_void<typename A::pointer>::type> {
0073     typedef typename A::pointer type;
0074 };
0075 
0076 } /* detail */
0077 
0078 template<class A>
0079 struct allocator_pointer {
0080     typedef typename detail::alloc_ptr<A>::type type;
0081 };
0082 
0083 namespace detail {
0084 
0085 template<class A, class = void>
0086 struct alloc_const_ptr {
0087     typedef typename boost::pointer_traits<typename
0088         boost::allocator_pointer<A>::type>::template rebind_to<const typename
0089             boost::allocator_value_type<A>::type>::type type;
0090 };
0091 
0092 template<class A>
0093 struct alloc_const_ptr<A,
0094     typename alloc_void<typename A::const_pointer>::type> {
0095     typedef typename A::const_pointer type;
0096 };
0097 
0098 } /* detail */
0099 
0100 template<class A>
0101 struct allocator_const_pointer {
0102     typedef typename detail::alloc_const_ptr<A>::type type;
0103 };
0104 
0105 namespace detail {
0106 
0107 template<class, class>
0108 struct alloc_to { };
0109 
0110 #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
0111 template<template<class> class A, class T, class U>
0112 struct alloc_to<A<U>, T> {
0113     typedef A<T> type;
0114 };
0115 
0116 template<template<class, class> class A, class T, class U, class V>
0117 struct alloc_to<A<U, V>, T> {
0118     typedef A<T, V> type;
0119 };
0120 
0121 template<template<class, class, class> class A, class T, class U, class V1,
0122     class V2>
0123 struct alloc_to<A<U, V1, V2>, T> {
0124     typedef A<T, V1, V2> type;
0125 };
0126 #else
0127 template<template<class, class...> class A, class T, class U, class... V>
0128 struct alloc_to<A<U, V...>, T> {
0129     typedef A<T, V...> type;
0130 };
0131 #endif
0132 
0133 template<class A, class T, class = void>
0134 struct alloc_rebind {
0135     typedef typename alloc_to<A, T>::type type;
0136 };
0137 
0138 template<class A, class T>
0139 struct alloc_rebind<A, T,
0140     typename alloc_void<typename A::template rebind<T>::other>::type> {
0141     typedef typename A::template rebind<T>::other type;
0142 };
0143 
0144 } /* detail */
0145 
0146 template<class A, class T>
0147 struct allocator_rebind {
0148     typedef typename detail::alloc_rebind<A, T>::type type;
0149 };
0150 
0151 namespace detail {
0152 
0153 template<class A, class = void>
0154 struct alloc_void_ptr {
0155      typedef typename boost::pointer_traits<typename
0156         boost::allocator_pointer<A>::type>::template
0157             rebind_to<void>::type type;
0158 };
0159 
0160 template<class A>
0161 struct alloc_void_ptr<A,
0162     typename alloc_void<typename A::void_pointer>::type> {
0163     typedef typename A::void_pointer type;
0164 };
0165 
0166 } /* detail */
0167 
0168 template<class A>
0169 struct allocator_void_pointer {
0170     typedef typename detail::alloc_void_ptr<A>::type type;
0171 };
0172 
0173 namespace detail {
0174 
0175 template<class A, class = void>
0176 struct alloc_const_void_ptr {
0177      typedef typename boost::pointer_traits<typename
0178         boost::allocator_pointer<A>::type>::template
0179             rebind_to<const void>::type type;
0180 };
0181 
0182 template<class A>
0183 struct alloc_const_void_ptr<A,
0184     typename alloc_void<typename A::const_void_pointer>::type> {
0185     typedef typename A::const_void_pointer type;
0186 };
0187 
0188 } /* detail */
0189 
0190 template<class A>
0191 struct allocator_const_void_pointer {
0192     typedef typename detail::alloc_const_void_ptr<A>::type type;
0193 };
0194 
0195 namespace detail {
0196 
0197 template<class A, class = void>
0198 struct alloc_diff_type {
0199     typedef typename boost::pointer_traits<typename
0200         boost::allocator_pointer<A>::type>::difference_type type;
0201 };
0202 
0203 template<class A>
0204 struct alloc_diff_type<A,
0205     typename alloc_void<typename A::difference_type>::type> {
0206     typedef typename A::difference_type type;
0207 };
0208 
0209 } /* detail */
0210 
0211 template<class A>
0212 struct allocator_difference_type {
0213     typedef typename detail::alloc_diff_type<A>::type type;
0214 };
0215 
0216 namespace detail {
0217 
0218 #if defined(BOOST_NO_CXX11_ALLOCATOR)
0219 template<class A, class = void>
0220 struct alloc_size_type {
0221     typedef std::size_t type;
0222 };
0223 #else
0224 template<class A, class = void>
0225 struct alloc_size_type {
0226     typedef typename std::make_unsigned<typename
0227         boost::allocator_difference_type<A>::type>::type type;
0228 };
0229 #endif
0230 
0231 template<class A>
0232 struct alloc_size_type<A,
0233     typename alloc_void<typename A::size_type>::type> {
0234     typedef typename A::size_type type;
0235 };
0236 
0237 } /* detail */
0238 
0239 template<class A>
0240 struct allocator_size_type {
0241     typedef typename detail::alloc_size_type<A>::type type;
0242 };
0243 
0244 namespace detail {
0245 
0246 #if defined(BOOST_NO_CXX11_ALLOCATOR)
0247 template<bool V>
0248 struct alloc_bool {
0249     typedef bool value_type;
0250     typedef alloc_bool type;
0251 
0252     static const bool value = V;
0253 
0254     operator bool() const BOOST_NOEXCEPT {
0255         return V;
0256     }
0257 
0258     bool operator()() const BOOST_NOEXCEPT {
0259         return V;
0260     }
0261 };
0262 
0263 template<bool V>
0264 const bool alloc_bool<V>::value;
0265 
0266 typedef alloc_bool<false> alloc_false;
0267 #else
0268 typedef std::false_type alloc_false;
0269 #endif
0270 
0271 template<class A, class = void>
0272 struct alloc_pocca {
0273     typedef alloc_false type;
0274 };
0275 
0276 template<class A>
0277 struct alloc_pocca<A,
0278     typename alloc_void<typename
0279         A::propagate_on_container_copy_assignment>::type> {
0280     typedef typename A::propagate_on_container_copy_assignment type;
0281 };
0282 
0283 } /* detail */
0284 
0285 template<class A, class = void>
0286 struct allocator_propagate_on_container_copy_assignment {
0287     typedef typename detail::alloc_pocca<A>::type type;
0288 };
0289 
0290 namespace detail {
0291 
0292 template<class A, class = void>
0293 struct alloc_pocma {
0294     typedef alloc_false type;
0295 };
0296 
0297 template<class A>
0298 struct alloc_pocma<A,
0299     typename alloc_void<typename
0300         A::propagate_on_container_move_assignment>::type> {
0301     typedef typename A::propagate_on_container_move_assignment type;
0302 };
0303 
0304 } /* detail */
0305 
0306 template<class A>
0307 struct allocator_propagate_on_container_move_assignment {
0308     typedef typename detail::alloc_pocma<A>::type type;
0309 };
0310 
0311 namespace detail {
0312 
0313 template<class A, class = void>
0314 struct alloc_pocs {
0315     typedef alloc_false type;
0316 };
0317 
0318 template<class A>
0319 struct alloc_pocs<A,
0320     typename alloc_void<typename A::propagate_on_container_swap>::type> {
0321     typedef typename A::propagate_on_container_swap type;
0322 };
0323 
0324 } /* detail */
0325 
0326 template<class A>
0327 struct allocator_propagate_on_container_swap {
0328     typedef typename detail::alloc_pocs<A>::type type;
0329 };
0330 
0331 namespace detail {
0332 
0333 #if !defined(BOOST_NO_CXX11_ALLOCATOR)
0334 template<class A, class = void>
0335 struct alloc_equal {
0336     typedef typename std::is_empty<A>::type type;
0337 };
0338 #elif defined(BOOST_DETAIL_ALLOC_EMPTY)
0339 template<class A, class = void>
0340 struct alloc_equal {
0341     typedef alloc_bool<BOOST_DETAIL_ALLOC_EMPTY(A)> type;
0342 };
0343 #else
0344 template<class A, class = void>
0345 struct alloc_equal {
0346     typedef alloc_false type;
0347 };
0348 #endif
0349 
0350 template<class A>
0351 struct alloc_equal<A,
0352     typename alloc_void<typename A::is_always_equal>::type> {
0353     typedef typename A::is_always_equal type;
0354 };
0355 
0356 } /* detail */
0357 
0358 template<class A>
0359 struct allocator_is_always_equal {
0360     typedef typename detail::alloc_equal<A>::type type;
0361 };
0362 
0363 template<class A>
0364 inline typename allocator_pointer<A>::type
0365 allocator_allocate(A& a, typename allocator_size_type<A>::type n)
0366 {
0367     return a.allocate(n);
0368 }
0369 
0370 template<class A>
0371 inline void
0372 allocator_deallocate(A& a, typename allocator_pointer<A>::type p,
0373     typename allocator_size_type<A>::type n)
0374 {
0375     a.deallocate(p, n);
0376 }
0377 
0378 #if defined(BOOST_NO_CXX11_ALLOCATOR)
0379 template<class A>
0380 inline typename allocator_pointer<A>::type
0381 allocator_allocate(A& a, typename allocator_size_type<A>::type n,
0382     typename allocator_const_void_pointer<A>::type h)
0383 {
0384     return a.allocate(n, h);
0385 }
0386 #else
0387 namespace detail {
0388 
0389 template<class>
0390 struct alloc_no {
0391     char x, y;
0392 };
0393 
0394 template<class A>
0395 class alloc_has_allocate {
0396     template<class O>
0397     static auto check(int)
0398     -> alloc_no<decltype(std::declval<O&>().allocate(std::declval<typename
0399         boost::allocator_size_type<A>::type>(), std::declval<typename
0400             boost::allocator_const_void_pointer<A>::type>()))>;
0401 
0402     template<class>
0403     static char check(long);
0404 
0405 public:
0406     BOOST_STATIC_CONSTEXPR bool value = sizeof(check<A>(0)) > 1;
0407 };
0408 
0409 } /* detail */
0410 
0411 template<class A>
0412 inline typename std::enable_if<detail::alloc_has_allocate<A>::value,
0413     typename allocator_pointer<A>::type>::type
0414 allocator_allocate(A& a, typename allocator_size_type<A>::type n,
0415     typename allocator_const_void_pointer<A>::type h)
0416 {
0417     return a.allocate(n, h);
0418 }
0419 
0420 template<class A>
0421 inline typename std::enable_if<!detail::alloc_has_allocate<A>::value,
0422     typename allocator_pointer<A>::type>::type
0423 allocator_allocate(A& a, typename allocator_size_type<A>::type n,
0424     typename allocator_const_void_pointer<A>::type)
0425 {
0426     return a.allocate(n);
0427 }
0428 #endif
0429 
0430 namespace detail {
0431 
0432 #if defined(BOOST_NO_CXX11_ALLOCATOR)
0433 template<class A, class = void>
0434 struct alloc_has_construct {
0435     BOOST_STATIC_CONSTEXPR bool value = false;
0436 };
0437 
0438 template<class A>
0439 struct alloc_has_construct<A,
0440     typename alloc_void<typename A::_default_construct_destroy>::type> {
0441     BOOST_STATIC_CONSTEXPR bool value = true;
0442 };
0443 #else
0444 template<class A, class T, class... Args>
0445 class alloc_has_construct {
0446     template<class O>
0447     static auto check(int)
0448     -> alloc_no<decltype(std::declval<O&>().construct(std::declval<T*>(),
0449         std::declval<Args&&>()...))>;
0450 
0451     template<class>
0452     static char check(long);
0453 
0454 public:
0455     BOOST_STATIC_CONSTEXPR bool value = sizeof(check<A>(0)) > 1;
0456 };
0457 #endif
0458 
0459 template<bool, class = void>
0460 struct alloc_if { };
0461 
0462 template<class T>
0463 struct alloc_if<true, T> {
0464     typedef T type;
0465 };
0466 
0467 } /* detail */
0468 
0469 #if defined(BOOST_NO_CXX11_ALLOCATOR)
0470 template<class A, class T>
0471 inline typename detail::alloc_if<detail::alloc_has_construct<A>::value>::type
0472 allocator_construct(A& a, T* p)
0473 {
0474     a.construct(p);
0475 }
0476 
0477 template<class A, class T>
0478 inline typename detail::alloc_if<!detail::alloc_has_construct<A>::value>::type
0479 allocator_construct(A&, T* p)
0480 {
0481     ::new((void*)p) T();
0482 }
0483 
0484 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
0485 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
0486 template<class A, class T, class V, class... Args>
0487 inline void
0488 allocator_construct(A&, T* p, V&& v, Args&&... args)
0489 {
0490     ::new((void*)p) T(std::forward<V>(v), std::forward<Args>(args)...);
0491 }
0492 #else
0493 template<class A, class T, class V>
0494 inline void
0495 allocator_construct(A&, T* p, V&& v)
0496 {
0497     ::new((void*)p) T(std::forward<V>(v));
0498 }
0499 #endif
0500 #else
0501 template<class A, class T, class V>
0502 inline void
0503 allocator_construct(A&, T* p, const V& v)
0504 {
0505     ::new((void*)p) T(v);
0506 }
0507 
0508 template<class A, class T, class V>
0509 inline void
0510 allocator_construct(A&, T* p, V& v)
0511 {
0512     ::new((void*)p) T(v);
0513 }
0514 #endif
0515 #else
0516 template<class A, class T, class... Args>
0517 inline typename std::enable_if<detail::alloc_has_construct<A, T,
0518     Args...>::value>::type
0519 allocator_construct(A& a, T* p, Args&&... args)
0520 {
0521     a.construct(p, std::forward<Args>(args)...);
0522 }
0523 
0524 template<class A, class T, class... Args>
0525 inline typename std::enable_if<!detail::alloc_has_construct<A, T,
0526     Args...>::value>::type
0527 allocator_construct(A&, T* p, Args&&... args)
0528 {
0529     ::new((void*)p) T(std::forward<Args>(args)...);
0530 }
0531 #endif
0532 
0533 namespace detail {
0534 
0535 #if defined(BOOST_NO_CXX11_ALLOCATOR)
0536 template<class A, class, class = void>
0537 struct alloc_has_destroy {
0538     BOOST_STATIC_CONSTEXPR bool value = false;
0539 };
0540 
0541 template<class A, class T>
0542 struct alloc_has_destroy<A, T,
0543     typename alloc_void<typename A::_default_construct_destroy>::type> {
0544     BOOST_STATIC_CONSTEXPR bool value = true;
0545 };
0546 #else
0547 template<class A, class T>
0548 class alloc_has_destroy {
0549     template<class O>
0550     static auto check(int)
0551     -> alloc_no<decltype(std::declval<O&>().destroy(std::declval<T*>()))>;
0552 
0553     template<class>
0554     static char check(long);
0555 
0556 public:
0557     BOOST_STATIC_CONSTEXPR bool value = sizeof(check<A>(0)) > 1;
0558 };
0559 #endif
0560 
0561 } /* detail */
0562 
0563 template<class A, class T>
0564 inline typename detail::alloc_if<detail::alloc_has_destroy<A, T>::value>::type
0565 allocator_destroy(A& a, T* p)
0566 {
0567     a.destroy(p);
0568 }
0569 
0570 template<class A, class T>
0571 inline typename detail::alloc_if<!detail::alloc_has_destroy<A, T>::value>::type
0572 allocator_destroy(A&, T* p)
0573 {
0574     p->~T();
0575     (void)p;
0576 }
0577 
0578 namespace detail {
0579 
0580 #if defined(BOOST_NO_CXX11_ALLOCATOR)
0581 template<class T, T>
0582 struct alloc_no {
0583     char x, y;
0584 };
0585 
0586 template<class A>
0587 class alloc_has_max_size {
0588     template<class O>
0589     static alloc_no<typename boost::allocator_size_type<O>::type(O::*)(),
0590         &O::max_size> check(int);
0591 
0592     template<class O>
0593     static alloc_no<typename boost::allocator_size_type<O>::type(O::*)() const,
0594         &O::max_size> check(int);
0595 
0596     template<class O>
0597     static alloc_no<typename boost::allocator_size_type<O>::type(*)(),
0598         &O::max_size> check(int);
0599 
0600     template<class>
0601     static char check(long);
0602 
0603 public:
0604     BOOST_STATIC_CONSTEXPR bool value = sizeof(check<A>(0)) > 1;
0605 };
0606 #else
0607 template<class A>
0608 class alloc_has_max_size {
0609     template<class O>
0610     static auto check(int)
0611     -> alloc_no<decltype(std::declval<const O&>().max_size())>;
0612 
0613     template<class>
0614     static char check(long);
0615 
0616 public:
0617     BOOST_STATIC_CONSTEXPR bool value = sizeof(check<A>(0)) > 1;
0618 };
0619 #endif
0620 
0621 } /* detail */
0622 
0623 template<class A>
0624 inline typename detail::alloc_if<detail::alloc_has_max_size<A>::value,
0625     typename allocator_size_type<A>::type>::type
0626 allocator_max_size(const A& a) BOOST_NOEXCEPT
0627 {
0628     return a.max_size();
0629 }
0630 
0631 template<class A>
0632 inline typename detail::alloc_if<!detail::alloc_has_max_size<A>::value,
0633     typename allocator_size_type<A>::type>::type
0634 allocator_max_size(const A&) BOOST_NOEXCEPT
0635 {
0636     return (std::numeric_limits<typename
0637         allocator_size_type<A>::type>::max)() /
0638             sizeof(typename allocator_value_type<A>::type);
0639 }
0640 
0641 namespace detail {
0642 
0643 #if defined(BOOST_NO_CXX11_ALLOCATOR)
0644 template<class A>
0645 class alloc_has_soccc {
0646     template<class O>
0647     static alloc_no<O(O::*)(), &O::select_on_container_copy_construction>
0648     check(int);
0649 
0650     template<class O>
0651     static alloc_no<O(O::*)() const, &O::select_on_container_copy_construction>
0652     check(int);
0653 
0654     template<class O>
0655     static alloc_no<O(*)(), &O::select_on_container_copy_construction>
0656     check(int);
0657 
0658     template<class>
0659     static char check(long);
0660 
0661 public:
0662     BOOST_STATIC_CONSTEXPR bool value = sizeof(check<A>(0)) > 1;
0663 };
0664 #else
0665 template<class A>
0666 class alloc_has_soccc {
0667     template<class O>
0668     static auto check(int) -> alloc_no<decltype(std::declval<const
0669         O&>().select_on_container_copy_construction())>;
0670 
0671     template<class>
0672     static char check(long);
0673 
0674 public:
0675     BOOST_STATIC_CONSTEXPR bool value = sizeof(check<A>(0)) > 1;
0676 };
0677 #endif
0678 
0679 } /* detail */
0680 
0681 template<class A>
0682 inline typename detail::alloc_if<detail::alloc_has_soccc<A>::value, A>::type
0683 allocator_select_on_container_copy_construction(const A& a)
0684 {
0685     return a.select_on_container_copy_construction();
0686 }
0687 
0688 template<class A>
0689 inline typename detail::alloc_if<!detail::alloc_has_soccc<A>::value, A>::type
0690 allocator_select_on_container_copy_construction(const A& a)
0691 {
0692     return a;
0693 }
0694 
0695 template<class A, class T>
0696 inline void
0697 allocator_destroy_n(A& a, T* p, std::size_t n)
0698 {
0699     while (n > 0) {
0700         boost::allocator_destroy(a, p + --n);
0701     }
0702 }
0703 
0704 namespace detail {
0705 
0706 template<class A, class T>
0707 class alloc_destroyer {
0708 public:
0709     alloc_destroyer(A& a, T* p) BOOST_NOEXCEPT
0710         : a_(a), p_(p), n_(0) { }
0711 
0712     ~alloc_destroyer() {
0713         boost::allocator_destroy_n(a_, p_, n_);
0714     }
0715 
0716     std::size_t& size() BOOST_NOEXCEPT {
0717         return n_;
0718     }
0719 
0720 private:
0721     alloc_destroyer(const alloc_destroyer&);
0722     alloc_destroyer& operator=(const alloc_destroyer&);
0723 
0724     A& a_;
0725     T* p_;
0726     std::size_t n_;
0727 };
0728 
0729 } /* detail */
0730 
0731 template<class A, class T>
0732 inline void
0733 allocator_construct_n(A& a, T* p, std::size_t n)
0734 {
0735     detail::alloc_destroyer<A, T> d(a, p);
0736     for (std::size_t& i = d.size(); i < n; ++i) {
0737         boost::allocator_construct(a, p + i);
0738     }
0739     d.size() = 0;
0740 }
0741 
0742 template<class A, class T>
0743 inline void
0744 allocator_construct_n(A& a, T* p, std::size_t n, const T* l, std::size_t m)
0745 {
0746     detail::alloc_destroyer<A, T> d(a, p);
0747     for (std::size_t& i = d.size(); i < n; ++i) {
0748         boost::allocator_construct(a, p + i, l[i % m]);
0749     }
0750     d.size() = 0;
0751 }
0752 
0753 template<class A, class T, class I>
0754 inline void
0755 allocator_construct_n(A& a, T* p, std::size_t n, I b)
0756 {
0757     detail::alloc_destroyer<A, T> d(a, p);
0758     for (std::size_t& i = d.size(); i < n; void(++i), void(++b)) {
0759         boost::allocator_construct(a, p + i, *b);
0760     }
0761     d.size() = 0;
0762 }
0763 
0764 #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
0765 template<class A>
0766 using allocator_value_type_t = typename allocator_value_type<A>::type;
0767 
0768 template<class A>
0769 using allocator_pointer_t = typename allocator_pointer<A>::type;
0770 
0771 template<class A>
0772 using allocator_const_pointer_t = typename allocator_const_pointer<A>::type;
0773 
0774 template<class A>
0775 using allocator_void_pointer_t = typename allocator_void_pointer<A>::type;
0776 
0777 template<class A>
0778 using allocator_const_void_pointer_t =
0779     typename allocator_const_void_pointer<A>::type;
0780 
0781 template<class A>
0782 using allocator_difference_type_t =
0783     typename allocator_difference_type<A>::type;
0784 
0785 template<class A>
0786 using allocator_size_type_t = typename allocator_size_type<A>::type;
0787 
0788 template<class A>
0789 using allocator_propagate_on_container_copy_assignment_t =
0790     typename allocator_propagate_on_container_copy_assignment<A>::type;
0791 
0792 template<class A>
0793 using allocator_propagate_on_container_move_assignment_t =
0794     typename allocator_propagate_on_container_move_assignment<A>::type;
0795 
0796 template<class A>
0797 using allocator_propagate_on_container_swap_t =
0798     typename allocator_propagate_on_container_swap<A>::type;
0799 
0800 template<class A>
0801 using allocator_is_always_equal_t =
0802     typename allocator_is_always_equal<A>::type;
0803 
0804 template<class A, class T>
0805 using allocator_rebind_t = typename allocator_rebind<A, T>::type;
0806 #endif
0807 
0808 } /* boost */
0809 
0810 #if defined(_MSC_VER)
0811 #pragma warning(pop)
0812 #endif
0813 #if defined(_STL_RESTORE_DEPRECATED_WARNING)
0814 _STL_RESTORE_DEPRECATED_WARNING
0815 #endif
0816 #if defined(_LIBCPP_SUPPRESS_DEPRECATED_POP)
0817 _LIBCPP_SUPPRESS_DEPRECATED_POP
0818 #endif
0819 
0820 #endif