123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- #ifndef BOOST_LOG_ALLOCATOR_TRAITS_HPP_INCLUDED_
- #define BOOST_LOG_ALLOCATOR_TRAITS_HPP_INCLUDED_
- #include <memory>
- #include <boost/log/detail/config.hpp>
- #if defined(BOOST_NO_CXX11_ALLOCATOR)
- #include <boost/core/allocator_access.hpp>
- #include <boost/core/allocator_traits.hpp>
- #endif
- #include <boost/log/utility/use_std_allocator.hpp>
- #include <boost/log/detail/header.hpp>
- #ifdef BOOST_HAS_PRAGMA_ONCE
- #pragma once
- #endif
- namespace boost {
- BOOST_LOG_OPEN_NAMESPACE
- namespace aux {
- #if !defined(BOOST_NO_CXX11_ALLOCATOR)
- using std::allocator_traits;
- #else
- using boost::allocator_traits;
- #endif
- template< typename Allocator, typename U >
- struct rebind_alloc
- {
- #if !defined(BOOST_NO_CXX11_ALLOCATOR)
- typedef typename std::allocator_traits< Allocator >::BOOST_NESTED_TEMPLATE rebind_alloc< U > type;
- #else
- typedef typename boost::allocator_rebind< Allocator, U >::type type;
- #endif
- };
- template< typename T, typename U >
- struct rebind_alloc< std::allocator< T >, U >
- {
- typedef std::allocator< U > type;
- };
- template< typename U >
- struct rebind_alloc< use_std_allocator, U >
- {
- typedef std::allocator< U > type;
- };
- }
- BOOST_LOG_CLOSE_NAMESPACE
- }
- #include <boost/log/detail/footer.hpp>
- #endif
|