File indexing completed on 2026-08-30 08:23:10
0001
0002
0003
0004
0005
0006
0007
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
0022 #include <boost/move/adl_move_swap.hpp>
0023 #include <boost/move/utility_core.hpp>
0024 #include <boost/container/detail/mpl.hpp>
0025
0026 namespace boost {
0027 namespace container {
0028 namespace dtl {
0029
0030 template<class AllocatorType>
0031 inline void swap_alloc(AllocatorType &, AllocatorType &, dtl::false_type)
0032 BOOST_NOEXCEPT_OR_NOTHROW
0033 {}
0034
0035 template<class AllocatorType>
0036 inline void swap_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type)
0037 { boost::adl_move_swap(l, r); }
0038
0039 template<class AllocatorType>
0040 inline void assign_alloc(AllocatorType &, const AllocatorType &, dtl::false_type)
0041 BOOST_NOEXCEPT_OR_NOTHROW
0042 {}
0043
0044 template<class AllocatorType>
0045 inline void assign_alloc(AllocatorType &l, const AllocatorType &r, dtl::true_type)
0046 { l = r; }
0047
0048 template<class AllocatorType>
0049 inline void move_alloc(AllocatorType &, AllocatorType &, dtl::false_type)
0050 BOOST_NOEXCEPT_OR_NOTHROW
0051 {}
0052
0053 template<class AllocatorType>
0054 inline void move_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type)
0055 { l = ::boost::move(r); }
0056
0057 }
0058 }
0059 }
0060
0061 #endif