]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/container/detail/container_or_allocator_rebind.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / container / detail / container_or_allocator_rebind.hpp
1 //////////////////////////////////////////////////////////////////////////////
2 //
3 // (C) Copyright Ion Gaztanaga 2017-2017. Distributed under the Boost
4 // Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // See http://www.boost.org/libs/container for documentation.
8 //
9 //////////////////////////////////////////////////////////////////////////////
10 #ifndef BOOST_CONTAINER_DETAIL_CONTAINER_OR_ALLOCATOR_REBIND_HPP
11 #define BOOST_CONTAINER_DETAIL_CONTAINER_OR_ALLOCATOR_REBIND_HPP
12
13 #ifndef BOOST_CONFIG_HPP
14 # include <boost/config.hpp>
15 #endif
16
17 #if defined(BOOST_HAS_PRAGMA_ONCE)
18 # pragma once
19 #endif
20
21 #include <boost/container/allocator_traits.hpp>
22 #include <boost/container/detail/container_rebind.hpp>
23 #include <boost/container/detail/is_container.hpp>
24
25 namespace boost {
26 namespace container {
27 namespace container_detail {
28
29 template<class AllocatorOrContainer, class ToType, bool = is_container<AllocatorOrContainer>::value>
30 struct container_or_allocator_rebind_impl
31 : container_rebind<AllocatorOrContainer, ToType>
32 {};
33
34 template<class AllocatorOrContainer, class ToType>
35 struct container_or_allocator_rebind_impl<AllocatorOrContainer, ToType, false>
36 : allocator_traits<AllocatorOrContainer>::template portable_rebind_alloc<ToType>
37
38 {};
39
40 template<class AllocatorOrContainer, class ToType>
41 struct container_or_allocator_rebind
42 : container_or_allocator_rebind_impl<AllocatorOrContainer, ToType>
43 {};
44
45 } //namespace container_detail {
46 } //namespace container {
47 } //namespace boost {
48
49 #endif //#ifndef BOOST_CONTAINER_DETAIL_CONTAINER_OR_ALLOCATOR_REBIND_HPP