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 2014-2015. 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_ALLOC_TRAITS_HPP
0011 #define BOOST_CONTAINER_DETAIL_ALLOC_TRAITS_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 // move
0022 #include <boost/move/adl_move_swap.hpp>
0023 #include <boost/move/utility_core.hpp>
0024 
0025 namespace boost {
0026 namespace container {
0027 namespace dtl {
0028 
0029 template<class AllocatorType>
0030 BOOST_CONTAINER_FORCEINLINE void swap_alloc(AllocatorType &, AllocatorType &, dtl::false_type)
0031    BOOST_NOEXCEPT_OR_NOTHROW
0032 {}
0033 
0034 template<class AllocatorType>
0035 BOOST_CONTAINER_FORCEINLINE void swap_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type)
0036 {  boost::adl_move_swap(l, r);   }
0037 
0038 template<class AllocatorType>
0039 BOOST_CONTAINER_FORCEINLINE void assign_alloc(AllocatorType &, const AllocatorType &, dtl::false_type)
0040    BOOST_NOEXCEPT_OR_NOTHROW
0041 {}
0042 
0043 template<class AllocatorType>
0044 BOOST_CONTAINER_FORCEINLINE void assign_alloc(AllocatorType &l, const AllocatorType &r, dtl::true_type)
0045 {  l = r;   }
0046 
0047 template<class AllocatorType>
0048 BOOST_CONTAINER_FORCEINLINE void move_alloc(AllocatorType &, AllocatorType &, dtl::false_type)
0049    BOOST_NOEXCEPT_OR_NOTHROW
0050 {}
0051 
0052 template<class AllocatorType>
0053 BOOST_CONTAINER_FORCEINLINE void move_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type)
0054 {  l = ::boost::move(r);   }
0055 
0056 }  //namespace dtl {
0057 }  //namespace container {
0058 }  //namespace boost {
0059 
0060 #endif   //#ifndef BOOST_CONTAINER_DETAIL_ALLOC_TRAITS_HPP