• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright (c) 2016-2019 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 #ifdef 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 #ifdef 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
43