Go to the documentation of this file.
15 #ifndef ABSL_CONTAINER_INTERNAL_CONTAINER_H_
16 #define ABSL_CONTAINER_INTERNAL_CONTAINER_H_
19 #include <type_traits>
21 #include "absl/meta/type_traits.h"
22 #include "absl/types/optional.h"
26 namespace container_internal {
28 template <
class,
class =
void>
31 struct IsTransparent<
T,
absl::
void_t<typename T::is_transparent>>
34 template <
bool is_transparent>
37 template <
typename K,
typename key_type>
44 template <
typename K,
typename key_type>
51 template <
typename PolicyTraits,
typename Alloc>
81 struct transfer_tag_t {};
101 assert(
alloc_.has_value());
117 template <
typename Policy,
typename PolicyTraits,
typename Alloc,
119 class node_handle :
public node_handle_base<PolicyTraits, Alloc> {
136 template <
typename Policy,
typename PolicyTraits,
typename Alloc>
137 class node_handle<Policy, PolicyTraits,
Alloc,
139 :
public node_handle_base<PolicyTraits, Alloc> {
152 -> decltype(PolicyTraits::mutable_key(
std::declval<
slot_type*>())) {
153 return PolicyTraits::mutable_key(this->
slot());
167 struct CommonAccess {
168 template <
typename Node>
173 template <
typename Node>
178 template <
typename Node>
183 template <
typename T,
typename...
Args>
185 return T(
typename T::transfer_tag_t{}, std::forward<Args>(
args)...);
188 template <
typename T,
typename...
Args>
190 return T(
typename T::move_tag_t{}, std::forward<Args>(
args)...);
195 template <
class Iterator,
class NodeType>
196 struct InsertReturnType {
206 #endif // ABSL_CONTAINER_INTERNAL_CONTAINER_H_
allocator_type get_allocator() const
static std::function< Slot &(Slot *)> element
node_handle_base(move_tag_t, const allocator_type &a, slot_type *s)
static void Destroy(Node *node)
integral_constant< bool, true > true_type
integral_constant< bool, false > false_type
node_handle_base(node_handle_base &&other) noexcept
#define ABSL_NAMESPACE_END
typename Policy::key_type key_type
#define T(upbtypeconst, upbtype, ctype, default_value)
static auto GetSlot(const Node &node) -> decltype(node.slot())
static T Move(Args &&... args)
auto key() const -> decltype(PolicyTraits::mutable_key(std::declval< slot_type * >()))
#define ABSL_NAMESPACE_BEGIN
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
node_handle_base(transfer_tag_t, const allocator_type &a, slot_type *s)
static T Transfer(Args &&... args)
absl::optional< allocator_type > alloc_
mapped_type & mapped() const
typename Policy::mapped_type mapped_type
void * Alloc(FlagOpFn op)
static std::function< void(void *, Slot *, Slot *)> transfer
unsigned char slot_space_[sizeof(slot_type)]
typename type_traits_internal::VoidTImpl< Ts... >::type void_t
static std::function< void(void *, Slot *, Slot)> construct
static void Reset(Node *node)
typename PolicyTraits::slot_type slot_type
node_handle_base & operator=(node_handle_base &&other) noexcept
value_type & value() const
bool empty() const noexcept
constexpr node_handle_base()=default
typename PolicyTraits::value_type value_type
static std::function< void(void *, Slot *)> destroy
grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:59