template <class Policy, class = void>

struct hash_policy_traits

Defined at line 33 of file ../../third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h

Defines how slots are initialized/destroyed/moved.

Public Methods

template <class P = Policy>
size_t space_used (const slot_type * slot)

Returns the amount of memory owned by `slot`, exclusive of `sizeof(*slot)`.

If `slot` is nullptr, returns the constant amount of memory owned by any

full slot or -1 if slots own variable amounts of memory.

PRECONDITION: `slot` is INITIALIZED or nullptr

Defined at line 98 of file ../../third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h

template <class F, class... Ts, class P = Policy>
decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) apply (F && f, Ts &&... ts)

Provides generalized access to the key for elements, both for elements in

the table and for elements that have not yet been inserted (or even

constructed). We would like an API that allows us to say: `key(args...)`

but we cannot do that for all cases, so we use this more general API that

can be used for many things, including the following:

- Given an element in a table, get its key.

- Given an element initializer, get its key.

- Given `emplace()` arguments, get the element key.

Implementations of this must adhere to a very strict technical

specification around aliasing and consuming arguments:

Let `value_type` be the result type of `element()` without ref- and

cv-qualifiers. The first argument is a functor, the rest are constructor

arguments for `value_type`. Returns `std::forward

<F

>(f)(k, xs...)`, where

`k` is the element key, and `xs...` are the new constructor arguments for

`value_type`. It's allowed for `k` to alias `xs...`, and for both to alias

`ts...`. The key won't be touched once `xs...` are used to construct an

element; `ts...` won't be touched at all, which allows `apply()` to consume

any rvalues among them.

If `value_type` is constructible from `Ts

&

&

...`, `Policy::apply()` must not

trigger a hard compile error unless it originates from `f`. In other words,

`Policy::apply()` must be SFINAE-friendly. If `value_type` is not

constructible from `Ts

&

&

...`, either SFINAE or a hard compile error is OK.

If `Ts...` is `[cv] value_type[

&

]` or `[cv] init_type[

&

]`,

`Policy::apply()` must work. A compile error is not allowed, SFINAE or not.

Defined at line 132 of file ../../third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h

template <class P = Policy>
decltype(P::apply(ReturnKey(), hash_policy_traits<Policy, type-parameter-0-1>::element(slot))) mutable_key (slot_type * slot)

Returns the "key" portion of the slot.

Used for node handle manipulation.

Defined at line 140 of file ../../third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h

template <class T, class P = Policy>
decltype(P::value(elem)) value (T * elem)

Returns the "value" (as opposed to the "key") portion of the element. Used

by maps to implement `operator[]`, `at()` and `insert_or_assign()`.

Defined at line 148 of file ../../third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h

template <class Hash>
HashSlotFn get_hash_slot_fn ()

Defined at line 155 of file ../../third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h

Records