]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/lockfree/detail/allocator_rebind_helper.hpp
buildsys: switch source download to quincy
[ceph.git] / ceph / src / boost / boost / lockfree / detail / allocator_rebind_helper.hpp
1 // boost lockfree: allocator rebind helper
2 //
3 // Copyright (C) 2017 Minmin Gong
4 //
5 // Distributed under the Boost Software License, Version 1.0. (See
6 // accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
8
9 #ifndef BOOST_LOCKFREE_ALLOCATOR_REBIND_HELPER_HPP_INCLUDED
10 #define BOOST_LOCKFREE_ALLOCATOR_REBIND_HELPER_HPP_INCLUDED
11
12 #include <memory>
13
14 namespace boost {
15 namespace lockfree {
16 namespace detail {
17
18 template <class allocator_type, class value_type>
19 struct allocator_rebind_helper
20 {
21 #if !defined( BOOST_NO_CXX11_ALLOCATOR )
22 typedef typename std::allocator_traits<allocator_type>::template rebind_alloc<value_type> type;
23 #else
24 typedef typename allocator_type::template rebind<value_type>::other type;
25 #endif
26 };
27
28 } /* namespace detail */
29 } /* namespace lockfree */
30 } /* namespace boost */
31
32 #endif /* BOOST_LOCKFREE_ALLOCATOR_REBIND_HELPER_HPP_INCLUDED */