Go to the documentation of this file.
33 #ifndef ABSL_CONTAINER_INTERNAL_NODE_HASH_POLICY_H_
34 #define ABSL_CONTAINER_INTERNAL_NODE_HASH_POLICY_H_
39 #include <type_traits>
42 #include "absl/base/config.h"
46 namespace container_internal {
48 template <
class Reference,
class Policy>
52 using slot_type =
typename std::remove_cv<
57 *slot = Policy::new_element(
alloc, std::forward<Args>(
args)...);
60 template <
class Alloc>
62 Policy::delete_element(
alloc, *slot);
65 template <
class Alloc>
67 *new_slot = *old_slot;
71 if (slot ==
nullptr)
return Policy::element_space_used(
nullptr);
72 return Policy::element_space_used(*slot);
77 template <
class T,
class P = Policy>
82 template <
class... Ts,
class P = Policy>
83 static auto apply(Ts&&... ts) -> decltype(
P::apply(std::forward<Ts>(ts)...)) {
84 return P::apply(std::forward<Ts>(ts)...);
92 #endif // ABSL_CONTAINER_INTERNAL_NODE_HASH_POLICY_H_
typename std::remove_cv< typename std::remove_reference< Reference >::type >::type * slot_type
static size_t space_used(const slot_type *slot)
MockFunction< int(int)> apply
#define ABSL_NAMESPACE_END
static void destroy(Alloc *alloc, slot_type *slot)
#define T(upbtypeconst, upbtype, ctype, default_value)
#define ABSL_NAMESPACE_BEGIN
static auto apply(Ts &&... ts) -> decltype(P::apply(std::forward< Ts >(ts)...))
void * Alloc(FlagOpFn op)
static Reference element(slot_type *slot)
ValueType< A > & Reference
static auto value(T *elem) -> decltype(P::value(elem))
static void construct(Alloc *alloc, slot_type *slot, Args &&... args)
static void transfer(Alloc *, slot_type *new_slot, slot_type *old_slot)
std::allocator< int > alloc
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:42