The class template allocator_traits supplies a uniform interface to all allocator types. More...
#include <allocator_traits.hpp>
Classes | |
struct | portable_rebind_alloc |
Public Types | |
typedef Alloc | allocator_type |
typedef Alloc::value_type | value_type |
template<typename T > | |
using | rebind_alloc = typename boost::intrusive::pointer_rebind< Alloc, T >::type |
template<typename T > | |
using | rebind_traits = allocator_traits< rebind_alloc< T > > |
Public Member Functions | |
typedef | BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT (boost::container::container_detail::, Alloc, pointer, value_type *) pointer |
typedef | BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT (boost::container::container_detail::, Alloc, const_pointer, typename boost::intrusive::pointer_traits< pointer >::template rebind_pointer< const value_type >) const _pointer |
typedef | BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT (boost::container::container_detail::, Alloc, reference, typename container_detail::unvoid< value_type >::type &) reference |
typedef | BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT (boost::container::container_detail::, Alloc, const_reference, const typename container_detail::unvoid< value_type >::type &) const _reference |
typedef | BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT (boost::container::container_detail::, Alloc, void_pointer, typename boost::intrusive::pointer_traits< pointer >::template rebind_pointer< void >) void_pointer |
typedef | BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT (boost::container::container_detail::, Alloc, const_void_pointer, typename boost::intrusive::pointer_traits< pointer >::template rebind_pointer< const void >) const _void_pointer |
typedef | BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT (boost::container::container_detail::, Alloc, difference_type, std::ptrdiff_t) difference_type |
typedef | BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT (boost::container::container_detail::, Alloc, size_type, std::size_t) size_type |
typedef | BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT (boost::container::container_detail::, Alloc, propagate_on_container_copy_assignment, container_detail::false_type) propagate_on_container_copy_assignment |
typedef | BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT (boost::container::container_detail::, Alloc, propagate_on_container_move_assignment, container_detail::false_type) propagate_on_container_move_assignment |
typedef | BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT (boost::container::container_detail::, Alloc, propagate_on_container_swap, container_detail::false_type) propagate_on_container_swap |
Static Public Member Functions | |
static pointer | allocate (Alloc &a, size_type n) |
Returns: a.allocate(n) More... | |
static void | deallocate (Alloc &a, pointer p, size_type n) |
Returns: a.deallocate(p, n) More... | |
static pointer | allocate (Alloc &a, size_type n, const_void_pointer p) |
Effects: calls a.allocate(n, p) if that call is well-formed; otherwise, invokes a.allocate(n) More... | |
template<class T > | |
static void | destroy (Alloc &a, T *p) BOOST_CONTAINER_NOEXCEPT |
Effects: calls a.destroy(p) if that call is well-formed; otherwise, invokes p->~T() . More... | |
static size_type | max_size (const Alloc &a) BOOST_CONTAINER_NOEXCEPT |
Returns: a.max_size() if that expression is well-formed; otherwise, numeric_limits<size_type>::max() . More... | |
static container_detail::if_c < boost::container::container_detail::has_member_function_callable_with_select_on_container_copy_construction < const Alloc >::value, Alloc, const Alloc & >::type | select_on_container_copy_construction (const Alloc &a) |
Returns: a.select_on_container_copy_construction() if that expression is well-formed; otherwise, a. More... | |
template<class T , class... Args> | |
static void | construct (Alloc &a, T *p, BOOST_FWD_REF(Args)...args) |
Effects: calls a.construct(p, std::forward<Args>(args)...) if that call is well-formed; otherwise, invokes ::new (static_cast<void*>(p)) T(std::forward<Args>(args)...) More... | |
The class template allocator_traits supplies a uniform interface to all allocator types.
This class is a C++03-compatible implementation of std::allocator_traits
typedef Alloc boost::container::allocator_traits< Alloc >::allocator_type |
using boost::container::allocator_traits< Alloc >::rebind_alloc = typename boost::intrusive::pointer_rebind<Alloc, T>::type |
using boost::container::allocator_traits< Alloc >::rebind_traits = allocator_traits< rebind_alloc<T> > |
typedef Alloc::value_type boost::container::allocator_traits< Alloc >::value_type |
|
inlinestatic |
Returns: a.allocate(n)
|
inlinestatic |
Effects: calls a.allocate(n, p)
if that call is well-formed; otherwise, invokes a.allocate(n)
typedef boost::container::allocator_traits< Alloc >::BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT | ( | boost::container::container_detail:: | , |
Alloc | , | ||
pointer | , | ||
value_type * | |||
) |
typedef boost::container::allocator_traits< Alloc >::BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT | ( | boost::container::container_detail:: | , |
Alloc | , | ||
reference | , | ||
typename container_detail::unvoid< value_type >::type & | |||
) |
typedef boost::container::allocator_traits< Alloc >::BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT | ( | boost::container::container_detail:: | , |
Alloc | , | ||
const_reference | , | ||
const typename container_detail::unvoid< value_type >::type & | |||
) | const |
typedef boost::container::allocator_traits< Alloc >::BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT | ( | boost::container::container_detail:: | , |
Alloc | , | ||
difference_type | , | ||
std::ptrdiff_t | |||
) |
typedef boost::container::allocator_traits< Alloc >::BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT | ( | boost::container::container_detail:: | , |
Alloc | , | ||
size_type | , | ||
std::size_t | |||
) |
typedef boost::container::allocator_traits< Alloc >::BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT | ( | boost::container::container_detail:: | , |
Alloc | , | ||
propagate_on_container_copy_assignment | , | ||
container_detail::false_type | |||
) |
typedef boost::container::allocator_traits< Alloc >::BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT | ( | boost::container::container_detail:: | , |
Alloc | , | ||
propagate_on_container_move_assignment | , | ||
container_detail::false_type | |||
) |
typedef boost::container::allocator_traits< Alloc >::BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT | ( | boost::container::container_detail:: | , |
Alloc | , | ||
propagate_on_container_swap | , | ||
container_detail::false_type | |||
) |
typedef boost::container::allocator_traits< Alloc >::BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT | ( | boost::container::container_detail:: | , |
Alloc | , | ||
const_pointer | , | ||
typename boost::intrusive::pointer_traits< pointer >::template rebind_pointer< const value_type > | |||
) | const |
typedef boost::container::allocator_traits< Alloc >::BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT | ( | boost::container::container_detail:: | , |
Alloc | , | ||
void_pointer | , | ||
typename boost::intrusive::pointer_traits< pointer >::template rebind_pointer< void > | |||
) |
typedef boost::container::allocator_traits< Alloc >::BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT | ( | boost::container::container_detail:: | , |
Alloc | , | ||
const_void_pointer | , | ||
typename boost::intrusive::pointer_traits< pointer >::template rebind_pointer< const void > | |||
) | const |
|
inlinestatic |
Effects: calls a.construct(p, std::forward<Args>(args)...)
if that call is well-formed; otherwise, invokes ::new (static_cast<void*>(p)) T(std::forward<Args>(args)...)
Referenced by boost::container::container_detail::dispatch_allocator_prefix_suffix(), boost::container::container_detail::dispatch_uses_allocator(), and boost::circular_buffer< Sample >::linearize().
|
inlinestatic |
Returns: a.deallocate(p, n)
Throws: Nothing
|
inlinestatic |
Effects: calls a.destroy(p)
if that call is well-formed; otherwise, invokes p->~T()
.
|
inlinestatic |
Returns: a.max_size()
if that expression is well-formed; otherwise, numeric_limits<size_type>::max()
.
Referenced by boost::circular_buffer< Sample >::max_size().
|
inlinestatic |
Returns: a.select_on_container_copy_construction()
if that expression is well-formed; otherwise, a.