11 #ifndef ASIO_ASSOCIATED_ALLOCATOR_HPP 12 #define ASIO_ASSOCIATED_ALLOCATOR_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 #include "asio/detail/config.hpp" 20 #include "asio/detail/type_traits.hpp" 22 #include "asio/detail/push_options.hpp" 27 template <
typename T,
typename E,
typename =
void>
32 static type
get(
const T&,
const E& e) ASIO_NOEXCEPT
38 template <
typename T,
typename E>
40 typename
void_type<typename T::allocator_type>::type>
42 typedef typename T::allocator_type type;
44 static type
get(
const T& t,
const E&) ASIO_NOEXCEPT
46 return t.get_allocator();
71 template <
typename T,
typename Allocator = std::allocator<
void> >
76 #if defined(GENERATING_DOCUMENTATION) 77 typedef see_below
type;
78 #else // defined(GENERATING_DOCUMENTATION) 79 typedef typename detail::associated_allocator_impl<T, Allocator>::type
type;
80 #endif // defined(GENERATING_DOCUMENTATION) 84 static type
get(
const T& t,
85 const Allocator& a = Allocator()) ASIO_NOEXCEPT
97 get_associated_allocator(
const T& t) ASIO_NOEXCEPT
106 template <
typename T,
typename Allocator>
108 get_associated_allocator(
const T& t,
const Allocator& a) ASIO_NOEXCEPT
113 #if defined(ASIO_HAS_ALIAS_TEMPLATES) 115 template <
typename T,
typename Allocator = std::allocator<
void> >
116 using associated_allocator_t
119 #endif // defined(ASIO_HAS_ALIAS_TEMPLATES) 123 #include "asio/detail/pop_options.hpp" 125 #endif // ASIO_ASSOCIATED_ALLOCATOR_HPP Definition: type_traits.hpp:135
static type get(const T &t, const Allocator &a=Allocator()) ASIO_NOEXCEPT
If T has a nested type allocator_type, returns t.get_allocator().
Definition: associated_allocator.hpp:84
Traits type used to obtain the allocator associated with an object.
Definition: associated_allocator.hpp:72
Definition: associated_allocator.hpp:28
detail::associated_allocator_impl< T, Allocator >::type type
If T has a nested type allocator_type, T::allocator_type.
Definition: associated_allocator.hpp:79
Definition: any_io_executor.hpp:28