]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/beast/core/detail/allocator.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / beast / core / detail / allocator.hpp
1 //
2 // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // Official repository: https://github.com/boostorg/beast
8 //
9
10 #ifndef BOOST_BEAST_DETAIL_ALLOCATOR_HPP
11 #define BOOST_BEAST_DETAIL_ALLOCATOR_HPP
12
13 #include <boost/config.hpp>
14 #if BOOST_NO_CXX11_ALLOCATOR
15 #include <boost/container/allocator_traits.hpp>
16 #else
17 #include <memory>
18 #endif
19
20 namespace boost {
21 namespace beast {
22 namespace detail {
23
24 // This is a workaround for allocator_traits
25 // implementations which falsely claim C++11
26 // compatibility.
27
28 #if BOOST_NO_CXX11_ALLOCATOR
29 template<class Alloc>
30 using allocator_traits = boost::container::allocator_traits<Alloc>;
31
32 #else
33 template<class Alloc>
34 using allocator_traits = std::allocator_traits<Alloc>;
35
36 #endif
37
38 } // detail
39 } // beast
40 } // boost
41
42 #endif