File indexing completed on 2025-01-18 09:39:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef BOOST_LOG_ALLOCATOR_TRAITS_HPP_INCLUDED_
0017 #define BOOST_LOG_ALLOCATOR_TRAITS_HPP_INCLUDED_
0018
0019 #include <memory>
0020 #include <boost/log/detail/config.hpp>
0021 #if defined(BOOST_NO_CXX11_ALLOCATOR)
0022 #include <boost/core/allocator_access.hpp>
0023 #include <boost/core/allocator_traits.hpp>
0024 #endif
0025 #include <boost/log/utility/use_std_allocator.hpp>
0026 #include <boost/log/detail/header.hpp>
0027
0028 #ifdef BOOST_HAS_PRAGMA_ONCE
0029 #pragma once
0030 #endif
0031
0032 namespace boost {
0033
0034 BOOST_LOG_OPEN_NAMESPACE
0035
0036 namespace aux {
0037
0038
0039 #if !defined(BOOST_NO_CXX11_ALLOCATOR)
0040 using std::allocator_traits;
0041 #else
0042 using boost::allocator_traits;
0043 #endif
0044
0045
0046
0047
0048
0049
0050
0051 template< typename Allocator, typename U >
0052 struct rebind_alloc
0053 {
0054 #if !defined(BOOST_NO_CXX11_ALLOCATOR)
0055 typedef typename std::allocator_traits< Allocator >::BOOST_NESTED_TEMPLATE rebind_alloc< U > type;
0056 #else
0057 typedef typename boost::allocator_rebind< Allocator, U >::type type;
0058 #endif
0059 };
0060
0061
0062
0063
0064
0065
0066
0067 template< typename T, typename U >
0068 struct rebind_alloc< std::allocator< T >, U >
0069 {
0070 typedef std::allocator< U > type;
0071 };
0072
0073 template< typename U >
0074 struct rebind_alloc< use_std_allocator, U >
0075 {
0076 typedef std::allocator< U > type;
0077 };
0078
0079 }
0080
0081 BOOST_LOG_CLOSE_NAMESPACE
0082
0083 }
0084
0085 #include <boost/log/detail/footer.hpp>
0086
0087 #endif