NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
phmap::priv::hash_policy_traits< Policy, class > 模板结构体 参考

#include <phmap_base.h>

struct  ConstantIteratorsImpl
 
struct  ConstantIteratorsImpl< P, phmap::void_t< typename P::constant_iterators > >
 
struct  ReturnKey
 

Public 类型

using slot_type = typename Policy::slot_type
 
using key_type = typename Policy::key_type
 
using init_type = typename Policy::init_type
 
using reference = decltype(Policy::element(std::declval<slot_type*>()))
 
using pointer = typename std::remove_reference<reference>::type*
 
using value_type = typename std::remove_reference<reference>::type
 
using constant_iterators = ConstantIteratorsImpl<>
 

静态 Public 成员函数

template<class Alloc , class... Args>
static void construct (Alloc *alloc, slot_type *slot, Args &&... args)
 
template<class Alloc >
static void destroy (Alloc *alloc, slot_type *slot)
 
template<class Alloc >
static void transfer (Alloc *alloc, slot_type *new_slot, slot_type *old_slot)
 
template<class P = Policy>
static auto element (slot_type *slot) -> decltype(P::element(slot))
 
template<class P = Policy>
static size_t space_used (const slot_type *slot)
 
template<class F , class... Ts, class P = Policy>
static auto apply (F &&f, Ts &&... ts) -> decltype(P::apply(std::forward< F >(f), std::forward< Ts >(ts)...))
 
template<class P = Policy>
static auto key (slot_type *slot) -> decltype(P::apply(ReturnKey(), element(slot)))
 
template<class T , class P = Policy>
static auto value (T *elem) -> decltype(P::value(elem))
 

静态 Private 成员函数

template<class Alloc , class P = Policy>
static auto transfer_impl (Alloc *alloc, slot_type *new_slot, slot_type *old_slot, int) -> decltype((void) P::transfer(alloc, new_slot, old_slot))
 
template<class Alloc >
static void transfer_impl (Alloc *alloc, slot_type *new_slot, slot_type *old_slot, char)
 

成员类型定义说明

◆ constant_iterators

template<class Policy , class = void>
using phmap::priv::hash_policy_traits< Policy, class >::constant_iterators = ConstantIteratorsImpl<>

◆ init_type

template<class Policy , class = void>
using phmap::priv::hash_policy_traits< Policy, class >::init_type = typename Policy::init_type

◆ key_type

template<class Policy , class = void>
using phmap::priv::hash_policy_traits< Policy, class >::key_type = typename Policy::key_type

◆ pointer

template<class Policy , class = void>
using phmap::priv::hash_policy_traits< Policy, class >::pointer = typename std::remove_reference<reference>::type*

◆ reference

template<class Policy , class = void>
using phmap::priv::hash_policy_traits< Policy, class >::reference = decltype(Policy::element(std::declval<slot_type*>()))

◆ slot_type

template<class Policy , class = void>
using phmap::priv::hash_policy_traits< Policy, class >::slot_type = typename Policy::slot_type

◆ value_type

template<class Policy , class = void>
using phmap::priv::hash_policy_traits< Policy, class >::value_type = typename std::remove_reference<reference>::type

成员函数说明

◆ apply()

template<class Policy , class = void>
template<class F , class... Ts, class P = Policy>
static auto phmap::priv::hash_policy_traits< Policy, class >::apply ( F && f,
Ts &&... ts ) -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...))
inlinestatic

◆ construct()

template<class Policy , class = void>
template<class Alloc , class... Args>
static void phmap::priv::hash_policy_traits< Policy, class >::construct ( Alloc * alloc,
slot_type * slot,
Args &&... args )
inlinestatic

◆ destroy()

template<class Policy , class = void>
template<class Alloc >
static void phmap::priv::hash_policy_traits< Policy, class >::destroy ( Alloc * alloc,
slot_type * slot )
inlinestatic

◆ element()

template<class Policy , class = void>
template<class P = Policy>
static auto phmap::priv::hash_policy_traits< Policy, class >::element ( slot_type * slot) -> decltype(P::element(slot))
inlinestatic

◆ key()

template<class Policy , class = void>
template<class P = Policy>
static auto phmap::priv::hash_policy_traits< Policy, class >::key ( slot_type * slot) -> decltype(P::apply(ReturnKey(), element(slot)))
inlinestatic

◆ space_used()

template<class Policy , class = void>
template<class P = Policy>
static size_t phmap::priv::hash_policy_traits< Policy, class >::space_used ( const slot_type * slot)
inlinestatic

◆ transfer()

template<class Policy , class = void>
template<class Alloc >
static void phmap::priv::hash_policy_traits< Policy, class >::transfer ( Alloc * alloc,
slot_type * new_slot,
slot_type * old_slot )
inlinestatic

◆ transfer_impl() [1/2]

template<class Policy , class = void>
template<class Alloc >
static void phmap::priv::hash_policy_traits< Policy, class >::transfer_impl ( Alloc * alloc,
slot_type * new_slot,
slot_type * old_slot,
char  )
inlinestaticprivate

◆ transfer_impl() [2/2]

template<class Policy , class = void>
template<class Alloc , class P = Policy>
static auto phmap::priv::hash_policy_traits< Policy, class >::transfer_impl ( Alloc * alloc,
slot_type * new_slot,
slot_type * old_slot,
int  ) -> decltype((void)P::transfer(alloc, new_slot, old_slot))
inlinestaticprivate

◆ value()

template<class Policy , class = void>
template<class T , class P = Policy>
static auto phmap::priv::hash_policy_traits< Policy, class >::value ( T * elem) -> decltype(P::value(elem))
inlinestatic

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