Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //////////////////////////////////////////////////////////////////////////////
0002 //
0003 // (C) Copyright Ion Gaztanaga 2017-2017. Distributed under the Boost
0004 // Software License, Version 1.0. (See accompanying file
0005 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // See http://www.boost.org/libs/container for documentation.
0008 //
0009 //////////////////////////////////////////////////////////////////////////////
0010 #ifndef BOOST_CONTAINER_DETAIL_CONTAINER_OR_ALLOCATOR_REBIND_HPP
0011 #define BOOST_CONTAINER_DETAIL_CONTAINER_OR_ALLOCATOR_REBIND_HPP
0012 
0013 #ifndef BOOST_CONFIG_HPP
0014 #  include <boost/config.hpp>
0015 #endif
0016 
0017 #if defined(BOOST_HAS_PRAGMA_ONCE)
0018 #  pragma once
0019 #endif
0020 
0021 #include <boost/container/allocator_traits.hpp>
0022 #include <boost/container/detail/container_rebind.hpp>
0023 #include <boost/container/detail/is_container.hpp>
0024 
0025 namespace boost {
0026 namespace container {
0027 namespace dtl {
0028 
0029 template<class AllocatorOrContainer, class ToType, bool = is_container<AllocatorOrContainer>::value>
0030 struct container_or_allocator_rebind_impl
0031    : container_rebind<AllocatorOrContainer, ToType>
0032 {};
0033 
0034 template<class AllocatorOrContainer, class ToType>
0035 struct container_or_allocator_rebind_impl<AllocatorOrContainer, ToType, false>
0036    : allocator_traits<AllocatorOrContainer>::template portable_rebind_alloc<ToType>
0037 {};
0038 
0039 template<class ToType>
0040 struct container_or_allocator_rebind_impl<void, ToType, false>
0041    : real_allocator<ToType, void>
0042 {};
0043 
0044 template<class AllocatorOrContainer, class ToType>
0045 struct container_or_allocator_rebind
0046    : container_or_allocator_rebind_impl<AllocatorOrContainer, ToType>
0047 {};
0048 
0049 }  //namespace dtl {
0050 }  //namespace container {
0051 }  //namespace boost {
0052 
0053 #endif   //#ifndef BOOST_CONTAINER_DETAIL_CONTAINER_OR_ALLOCATOR_REBIND_HPP