Go to the documentation of this file.
15 #ifndef ABSL_CONTAINER_INTERNAL_HASH_POLICY_TRAITS_H_
16 #define ABSL_CONTAINER_INTERNAL_HASH_POLICY_TRAITS_H_
21 #include <type_traits>
24 #include "absl/meta/type_traits.h"
28 namespace container_internal {
31 template <
class Policy,
class =
void>
40 #if defined(__cpp_lib_launder) && __cpp_lib_launder >= 201606
45 const_cast<key_type*
>(std::addressof(std::forward<Key>(
k))));
51 return std::forward<Key>(
k);
57 template <
class Key,
class...
Args>
59 -> decltype(
Impl(std::forward<Key>(
k), 0)) {
60 return Impl(std::forward<Key>(
k), 0);
64 template <
class P = Policy,
class =
void>
69 : P::constant_iterators {};
99 template <
class Alloc>
115 template <
class Alloc>
122 template <
class P = Policy>
133 template <
class P = Policy>
135 return P::space_used(slot);
167 template <
class F,
class... Ts,
class P = Policy>
168 static auto apply(F&& f, Ts&&... ts)
169 -> decltype(
P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
170 return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
175 template <
class P = Policy>
183 template <
class T,
class P = Policy>
190 template <
class Alloc,
class P = Policy>
196 template <
class Alloc>
208 #endif // ABSL_CONTAINER_INTERNAL_HASH_POLICY_TRAITS_H_
static std::function< Slot &(Slot *)> element
static size_t space_used(const slot_type *slot)
static auto mutable_key(slot_type *slot) -> decltype(P::apply(ReturnKey(), element(slot)))
static void destroy(Alloc *alloc, slot_type *slot)
static Key Impl(Key &&k, char)
static auto element(slot_type *slot) -> decltype(P::element(slot))
integral_constant< bool, false > false_type
static auto transfer_impl(Alloc *alloc, slot_type *new_slot, slot_type *old_slot, int) -> decltype((void) P::transfer(alloc, new_slot, old_slot))
MockFunction< int(int)> apply
typename std::enable_if< B, T >::type enable_if_t
#define ABSL_NAMESPACE_END
auto operator()(Key &&k, const Args &...) const -> decltype(Impl(std::forward< Key >(k), 0))
#define T(upbtypeconst, upbtype, ctype, default_value)
static auto value(T *elem) -> decltype(P::value(elem))
#define ABSL_NAMESPACE_BEGIN
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
typename Policy::key_type key_type
typename Policy::init_type init_type
void * Alloc(FlagOpFn op)
static std::function< void(void *, Slot *, Slot *)> transfer
typename std::remove_reference< reference >::type * pointer
typename type_traits_internal::VoidTImpl< Ts... >::type void_t
static std::function< void(void *, Slot *, Slot)> construct
static void construct(Alloc *alloc, slot_type *slot, Args &&... args)
typename Policy::slot_type slot_type
internal::KeyMatcher< M > Key(M inner_matcher)
typename std::remove_reference< reference >::type value_type
static auto apply(F &&f, Ts &&... ts) -> decltype(P::apply(std::forward< F >(f), std::forward< Ts >(ts)...))
std::allocator< int > alloc
static void transfer_impl(Alloc *alloc, slot_type *new_slot, slot_type *old_slot, char)
static std::function< void(void *, Slot *)> destroy
static void transfer(Alloc *alloc, slot_type *new_slot, slot_type *old_slot)
decltype(Policy::element(std::declval< slot_type * >())) reference
grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:00