15 #ifndef ABSL_CONTAINER_INTERNAL_CONTAINER_H_ 16 #define ABSL_CONTAINER_INTERNAL_CONTAINER_H_ 19 #include <type_traits> 25 namespace container_internal {
27 template <
class,
class =
void>
33 template <
bool is_transparent>
36 template <
typename K,
typename key_type>
43 template <
typename K,
typename key_type>
50 template <
typename PolicyTraits,
typename Alloc>
74 explicit operator bool() const noexcept {
return !empty(); }
92 assert(
alloc_.has_value());
98 return reinterpret_cast<slot_type*
>(std::addressof(slot_space_));
109 template <
typename Policy,
typename PolicyTraits,
typename Alloc,
128 template <
typename Policy,
typename PolicyTraits,
typename Alloc>
130 absl::
void_t<typename Policy::mapped_type>>
140 auto key() const -> decltype(PolicyTraits::key(this->slot())) {
141 return PolicyTraits::key(this->slot());
156 template <
typename Node>
157 static auto GetSlot(
const Node& node) -> decltype(node.slot()) {
161 template <
typename Node>
166 template <
typename T,
typename... Args>
167 static T
Make(Args&&... args) {
168 return T(std::forward<Args>(args)...);
173 template <
class Iterator,
class NodeType>
183 #endif // ABSL_CONTAINER_INTERNAL_CONTAINER_H_
static std::function< Slot &(Slot *)> element
static auto GetSlot(const Node &node) -> decltype(node.slot())
value_type & value() const
static void Reset(Node *node)
typename PolicyTraits::value_type value_type
typename std::aligned_storage< Len, Align >::type aligned_storage_t
auto key() const -> decltype(PolicyTraits::key(this->slot()))
node_handle(const Alloc &a, typename Base::slot_type *s)
absl::aligned_storage_t< sizeof(slot_type), alignof(slot_type)> slot_space_
typename node_handle::node_handle_base Base
typename Policy::key_type key_type
typename node_handle::node_handle_base Base
static T Make(Args &&... args)
constexpr node_handle_base()
static std::function< void(void *, Slot *)> destroy
typename PolicyTraits::slot_type slot_type
mapped_type & mapped() const
absl::optional< allocator_type > alloc_
static std::function< void(void *, Slot *, Slot *)> transfer
allocator_type get_allocator() const
bool empty() const noexcept
typename type_traits_internal::VoidTImpl< Ts... >::type void_t
node_handle_base(node_handle_base &&other) noexcept
node_handle_base(const allocator_type &a, slot_type *s)
typename Policy::mapped_type mapped_type
std::allocator< int > alloc
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
node_handle_base & operator=(node_handle_base &&other) noexcept
node_handle(const Alloc &a, typename Base::slot_type *s)