|
| type_allocator ()=default |
| Default constructor. More...
|
|
template<typename... Args, typename = std::enable_if_t< std::is_constructible_v<Alloc, Args...>>> |
| type_allocator (Args &&... alloc) noexcept(std::is_nothrow_constructible_v< T, Args... >) |
| Constructor for forwarding any arguments to the underlying allocator. More...
|
|
| type_allocator (const type_allocator &)=default |
|
| type_allocator (type_allocator &&other) noexcept(std::is_nothrow_copy_constructible_v< Alloc >) |
|
template<typename U > |
| type_allocator (const type_allocator< U, Alloc > &other) noexcept(std::is_nothrow_constructible_v< Alloc, const type_allocator< U, Alloc > & >) |
|
template<typename U > |
| type_allocator (type_allocator< U, Alloc > &&other) noexcept(std::is_nothrow_constructible_v< Alloc, type_allocator< U, Alloc > && >) |
|
type_allocator & | operator= (const type_allocator &)=default |
|
type_allocator & | operator= (type_allocator &&rhs) noexcept(std::is_nothrow_copy_assignable_v< Alloc >) |
|
value_type * | allocate (size_t n) noexcept(noexcept(m_Alloc.allocate(n))) |
| Attempts to allocate a chunk of memory defined by n . More...
|
|
void | deallocate (value_type *p, size_t n) noexcept(noexcept(m_Alloc.deallocate(p, n))) |
| Attempts to deallocate the memory at location p . More...
|
|
template<typename... Args> |
std::enable_if< detail::has_construct_v< Alloc, value_type *, Args... >, void >::type | construct (value_type *p, Args &&... args) noexcept(detail::has_nothrow_construct_v< Alloc, value_type *, Args... >) |
| Constructs an object of T with the given ...args at the given location. More...
|
|
template<typename A = Alloc> |
std::enable_if< detail::has_destroy_v< A, value_type * >, void >::type | destroy (value_type *p) noexcept(detail::has_nothrow_destroy_v< Alloc, value_type * >) |
| Destructs an object of T at the given location. More...
|
|
template<typename A = Alloc> |
std::enable_if< detail::has_max_size_v< A >, size_type >::type | max_size () const noexcept(detail::has_nothrow_max_size_v< A >) |
| Returns the maximum size that an allocation of objects can be. More...
|
|
template<typename A = Alloc> |
std::enable_if< detail::has_owns_v< A >, bool >::type | owns (value_type *p) const noexcept(detail::has_nothrow_owns_v< A >) |
| Returns whether or not the allocator owns the given location in memory. More...
|
|
Alloc & | get_allocator () noexcept |
| Returns a reference to the underlying allocator. More...
|
|
const Alloc & | get_allocator () const noexcept |
| Returns a const reference to the underlying allocator. More...
|
|
template<typename T, typename Alloc>
class ktl::type_allocator< T, Alloc >
Wrapper class for making an untyped allocator into a typed allocator.
- Template Parameters
-
T | The type to use |
Alloc | The untyped allocator |