NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
phmap::allocator_traits< Alloc > 模板结构体 参考

#include <phmap_base.h>

Public 类型

using allocator_type = Alloc
 
using value_type = typename Alloc::value_type
 
using pointer
 
using const_pointer
 
using void_pointer
 
using const_void_pointer
 
using difference_type
 
using size_type
 
using propagate_on_container_copy_assignment
 
using propagate_on_container_move_assignment
 
using propagate_on_container_swap
 
using is_always_equal
 
template<typename T >
using rebind_alloc = typename memory_internal::RebindAlloc<Alloc, T>::type
 
template<typename T >
using rebind_traits = phmap::allocator_traits<rebind_alloc<T>>
 

静态 Public 成员函数

static pointer allocate (Alloc &a, size_type n)
 
static pointer allocate (Alloc &a, size_type n, const_void_pointer hint)
 
static void deallocate (Alloc &a, pointer p, size_type n)
 
template<typename T , typename... Args>
static void construct (Alloc &a, T *p, Args &&... args)
 
template<typename T >
static void destroy (Alloc &a, T *p)
 
static size_type max_size (const Alloc &a)
 
static Alloc select_on_container_copy_construction (const Alloc &a)
 

静态 Private 成员函数

template<typename A >
static auto allocate_impl (int, A &a, size_type n, const_void_pointer hint) -> decltype(a.allocate(n, hint))
 
static pointer allocate_impl (char, Alloc &a, size_type n, const_void_pointer)
 
template<typename A , typename... Args>
static auto construct_impl (int, A &a, Args &&... args) -> decltype(std::allocator_traits< A >::construct(a, std::forward< Args >(args)...))
 
template<typename T , typename... Args>
static void construct_impl (char, Alloc &, T *p, Args &&... args)
 
template<typename A , typename T >
static auto destroy_impl (int, A &a, T *p) -> decltype(std::allocator_traits< A >::destroy(a, p))
 
template<typename T >
static void destroy_impl (char, Alloc &, T *p)
 
template<typename A >
static auto max_size_impl (int, const A &a) -> decltype(a.max_size())
 
static size_type max_size_impl (char, const Alloc &)
 
template<typename A >
static auto select_on_container_copy_construction_impl (int, const A &a) -> decltype(a.select_on_container_copy_construction())
 
static Alloc select_on_container_copy_construction_impl (char, const Alloc &a)
 

成员类型定义说明

◆ allocator_type

template<typename Alloc >
using phmap::allocator_traits< Alloc >::allocator_type = Alloc

◆ const_pointer

template<typename Alloc >
using phmap::allocator_traits< Alloc >::const_pointer
初始值:
memory_internal::ExtractOrT<memory_internal::GetConstPointer, Alloc,
template rebind<const value_type>>
typename T::const_pointer GetConstPointer
Definition phmap_base.h:1235
Definition phmap_base.h:1325

◆ const_void_pointer

template<typename Alloc >
using phmap::allocator_traits< Alloc >::const_void_pointer
初始值:
memory_internal::ExtractOrT<
typename phmap::pointer_traits<pointer>::template rebind<const void>>
typename T::const_void_pointer GetConstVoidPointer
Definition phmap_base.h:1241

◆ difference_type

template<typename Alloc >
using phmap::allocator_traits< Alloc >::difference_type
初始值:
memory_internal::ExtractOrT<
typename T::difference_type GetDifferenceType
Definition phmap_base.h:1244
memory_internal::ExtractOrT< memory_internal::GetDifferenceType, Ptr, std::ptrdiff_t > difference_type
Definition phmap_base.h:1335

◆ is_always_equal

template<typename Alloc >
using phmap::allocator_traits< Alloc >::is_always_equal
初始值:
memory_internal::ExtractOrT<memory_internal::GetIsAlwaysEqual, Alloc,
typename std::is_empty<Alloc>::type>
typename T::is_always_equal GetIsAlwaysEqual
Definition phmap_base.h:1261

◆ pointer

template<typename Alloc >
using phmap::allocator_traits< Alloc >::pointer
初始值:
memory_internal::ExtractOrT<memory_internal::GetPointer,
Alloc, value_type*>
typename T::pointer GetPointer
Definition phmap_base.h:1232
typename Alloc::value_type value_type
Definition phmap_base.h:1384

◆ propagate_on_container_copy_assignment

template<typename Alloc >
using phmap::allocator_traits< Alloc >::propagate_on_container_copy_assignment
初始值:
memory_internal::ExtractOrT<
std::false_type>
typename T::propagate_on_container_copy_assignment GetPropagateOnContainerCopyAssignment
Definition phmap_base.h:1250

◆ propagate_on_container_move_assignment

template<typename Alloc >
using phmap::allocator_traits< Alloc >::propagate_on_container_move_assignment
初始值:
memory_internal::ExtractOrT<
std::false_type>
typename T::propagate_on_container_move_assignment GetPropagateOnContainerMoveAssignment
Definition phmap_base.h:1254

◆ propagate_on_container_swap

template<typename Alloc >
using phmap::allocator_traits< Alloc >::propagate_on_container_swap
初始值:
memory_internal::ExtractOrT<memory_internal::GetPropagateOnContainerSwap,
Alloc, std::false_type>
typename T::propagate_on_container_swap GetPropagateOnContainerSwap
Definition phmap_base.h:1258

◆ rebind_alloc

template<typename Alloc >
template<typename T >
using phmap::allocator_traits< Alloc >::rebind_alloc = typename memory_internal::RebindAlloc<Alloc, T>::type

◆ rebind_traits

template<typename Alloc >
template<typename T >
using phmap::allocator_traits< Alloc >::rebind_traits = phmap::allocator_traits<rebind_alloc<T>>

◆ size_type

template<typename Alloc >
using phmap::allocator_traits< Alloc >::size_type
初始值:
memory_internal::ExtractOrT<
typename std::make_unsigned<difference_type>::type>
typename T::size_type GetSizeType
Definition phmap_base.h:1247

◆ value_type

template<typename Alloc >
using phmap::allocator_traits< Alloc >::value_type = typename Alloc::value_type

◆ void_pointer

template<typename Alloc >
using phmap::allocator_traits< Alloc >::void_pointer
初始值:
memory_internal::ExtractOrT<
typename T::void_pointer GetVoidPointer
Definition phmap_base.h:1238

成员函数说明

◆ allocate() [1/2]

template<typename Alloc >
static pointer phmap::allocator_traits< Alloc >::allocate ( Alloc & a,
size_type n )
inlinestatic

◆ allocate() [2/2]

template<typename Alloc >
static pointer phmap::allocator_traits< Alloc >::allocate ( Alloc & a,
size_type n,
const_void_pointer hint )
inlinestatic

◆ allocate_impl() [1/2]

template<typename Alloc >
static pointer phmap::allocator_traits< Alloc >::allocate_impl ( char ,
Alloc & a,
size_type n,
const_void_pointer  )
inlinestaticprivate

◆ allocate_impl() [2/2]

template<typename Alloc >
template<typename A >
static auto phmap::allocator_traits< Alloc >::allocate_impl ( int ,
A & a,
size_type n,
const_void_pointer hint ) -> decltype(a.allocate(n, hint))
inlinestaticprivate

◆ construct()

template<typename Alloc >
template<typename T , typename... Args>
static void phmap::allocator_traits< Alloc >::construct ( Alloc & a,
T * p,
Args &&... args )
inlinestatic

◆ construct_impl() [1/2]

template<typename Alloc >
template<typename T , typename... Args>
static void phmap::allocator_traits< Alloc >::construct_impl ( char ,
Alloc & ,
T * p,
Args &&... args )
inlinestaticprivate

◆ construct_impl() [2/2]

template<typename Alloc >
template<typename A , typename... Args>
static auto phmap::allocator_traits< Alloc >::construct_impl ( int ,
A & a,
Args &&... args ) -> decltype(std::allocator_traits<A>::construct(a, std::forward<Args>(args)...))
inlinestaticprivate

◆ deallocate()

template<typename Alloc >
static void phmap::allocator_traits< Alloc >::deallocate ( Alloc & a,
pointer p,
size_type n )
inlinestatic

◆ destroy()

template<typename Alloc >
template<typename T >
static void phmap::allocator_traits< Alloc >::destroy ( Alloc & a,
T * p )
inlinestatic

◆ destroy_impl() [1/2]

template<typename Alloc >
template<typename T >
static void phmap::allocator_traits< Alloc >::destroy_impl ( char ,
Alloc & ,
T * p )
inlinestaticprivate

◆ destroy_impl() [2/2]

template<typename Alloc >
template<typename A , typename T >
static auto phmap::allocator_traits< Alloc >::destroy_impl ( int ,
A & a,
T * p ) -> decltype(std::allocator_traits<A>::destroy(a, p))
inlinestaticprivate

◆ max_size()

template<typename Alloc >
static size_type phmap::allocator_traits< Alloc >::max_size ( const Alloc & a)
inlinestatic

◆ max_size_impl() [1/2]

template<typename Alloc >
static size_type phmap::allocator_traits< Alloc >::max_size_impl ( char ,
const Alloc &  )
inlinestaticprivate

◆ max_size_impl() [2/2]

template<typename Alloc >
template<typename A >
static auto phmap::allocator_traits< Alloc >::max_size_impl ( int ,
const A & a ) -> decltype(a.max_size())
inlinestaticprivate

◆ select_on_container_copy_construction()

template<typename Alloc >
static Alloc phmap::allocator_traits< Alloc >::select_on_container_copy_construction ( const Alloc & a)
inlinestatic

◆ select_on_container_copy_construction_impl() [1/2]

template<typename Alloc >
static Alloc phmap::allocator_traits< Alloc >::select_on_container_copy_construction_impl ( char ,
const Alloc & a )
inlinestaticprivate

◆ select_on_container_copy_construction_impl() [2/2]

template<typename Alloc >
template<typename A >
static auto phmap::allocator_traits< Alloc >::select_on_container_copy_construction_impl ( int ,
const A & a ) -> decltype(a.select_on_container_copy_construction())
inlinestaticprivate

该结构体的文档由以下文件生成: