NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
phmap::allocator_traits< Alloc > 模板结构体 参考

#include <phmap_base.h>

Public 类型

using allocator_type = Alloc
 
using value_type = typename Alloc::value_type
 
using pointer = memory_internal::ExtractOrT< memory_internal::GetPointer, Alloc, value_type * >
 
using const_pointer = memory_internal::ExtractOrT< memory_internal::GetConstPointer, Alloc, typename phmap::pointer_traits< pointer >::template rebind< const value_type > >
 
using void_pointer = memory_internal::ExtractOrT< memory_internal::GetVoidPointer, Alloc, typename phmap::pointer_traits< pointer >::template rebind< void > >
 
using const_void_pointer = memory_internal::ExtractOrT< memory_internal::GetConstVoidPointer, Alloc, typename phmap::pointer_traits< pointer >::template rebind< const void > >
 
using difference_type = memory_internal::ExtractOrT< memory_internal::GetDifferenceType, Alloc, typename phmap::pointer_traits< pointer >::difference_type >
 
using size_type = memory_internal::ExtractOrT< memory_internal::GetSizeType, Alloc, typename std::make_unsigned< difference_type >::type >
 
using propagate_on_container_copy_assignment = memory_internal::ExtractOrT< memory_internal::GetPropagateOnContainerCopyAssignment, Alloc, std::false_type >
 
using propagate_on_container_move_assignment = memory_internal::ExtractOrT< memory_internal::GetPropagateOnContainerMoveAssignment, Alloc, std::false_type >
 
using propagate_on_container_swap = memory_internal::ExtractOrT< memory_internal::GetPropagateOnContainerSwap, Alloc, std::false_type >
 
using is_always_equal = memory_internal::ExtractOrT< memory_internal::GetIsAlwaysEqual, Alloc, typename std::is_empty< Alloc >::type >
 
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, typename phmap::pointer_traits<pointer>:: template rebind<const value_type> >

◆ const_void_pointer

template<typename Alloc >
using phmap::allocator_traits< Alloc >::const_void_pointer = memory_internal::ExtractOrT< memory_internal::GetConstVoidPointer, Alloc, typename phmap::pointer_traits<pointer>::template rebind<const void> >

◆ difference_type

template<typename Alloc >
using phmap::allocator_traits< Alloc >::difference_type = memory_internal::ExtractOrT< memory_internal::GetDifferenceType, Alloc, typename phmap::pointer_traits<pointer>::difference_type>

◆ 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>

◆ pointer

template<typename Alloc >
using phmap::allocator_traits< Alloc >::pointer = memory_internal::ExtractOrT<memory_internal::GetPointer, Alloc, value_type*>

◆ propagate_on_container_copy_assignment

template<typename Alloc >
using phmap::allocator_traits< Alloc >::propagate_on_container_copy_assignment = memory_internal::ExtractOrT< memory_internal::GetPropagateOnContainerCopyAssignment, Alloc, std::false_type>

◆ propagate_on_container_move_assignment

template<typename Alloc >
using phmap::allocator_traits< Alloc >::propagate_on_container_move_assignment = memory_internal::ExtractOrT< memory_internal::GetPropagateOnContainerMoveAssignment, Alloc, std::false_type>

◆ 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>

◆ 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< memory_internal::GetSizeType, Alloc, typename std::make_unsigned<difference_type>::type>

◆ 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< memory_internal::GetVoidPointer, Alloc, typename phmap::pointer_traits<pointer>::template rebind<void> >

成员函数说明

◆ 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

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