Files

61 lines
1.9 KiB
C++

//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2014-2015. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef ACTIV_BOOST_CONTAINER_DETAIL_ALLOC_TRAITS_HPP
#define ACTIV_BOOST_CONTAINER_DETAIL_ALLOC_TRAITS_HPP
#ifndef ACTIV_BOOST_CONFIG_HPP
# include <ActivBoost/config.hpp>
#endif
#if defined(ACTIV_BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
// move
#include <ActivBoost/move/adl_move_swap.hpp>
#include <ActivBoost/move/utility_core.hpp>
namespace Boost {
namespace container {
namespace dtl {
template<class AllocatorType>
ACTIV_BOOST_CONTAINER_FORCEINLINE void swap_alloc(AllocatorType &, AllocatorType &, dtl::false_type)
ACTIV_BOOST_NOEXCEPT_OR_NOTHROW
{}
template<class AllocatorType>
ACTIV_BOOST_CONTAINER_FORCEINLINE void swap_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type)
{ Boost::adl_move_swap(l, r); }
template<class AllocatorType>
ACTIV_BOOST_CONTAINER_FORCEINLINE void assign_alloc(AllocatorType &, const AllocatorType &, dtl::false_type)
ACTIV_BOOST_NOEXCEPT_OR_NOTHROW
{}
template<class AllocatorType>
ACTIV_BOOST_CONTAINER_FORCEINLINE void assign_alloc(AllocatorType &l, const AllocatorType &r, dtl::true_type)
{ l = r; }
template<class AllocatorType>
ACTIV_BOOST_CONTAINER_FORCEINLINE void move_alloc(AllocatorType &, AllocatorType &, dtl::false_type)
ACTIV_BOOST_NOEXCEPT_OR_NOTHROW
{}
template<class AllocatorType>
ACTIV_BOOST_CONTAINER_FORCEINLINE void move_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type)
{ l = ::Boost::move(r); }
} //namespace dtl {
} //namespace container {
} //namespace Boost {
#endif //#ifndef ACTIV_BOOST_CONTAINER_DETAIL_ALLOC_TRAITS_HPP