36 #ifndef ABSL_CONTAINER_NODE_HASH_MAP_H_ 37 #define ABSL_CONTAINER_NODE_HASH_MAP_H_ 40 #include <type_traits> 51 namespace container_internal {
52 template <
class Key,
class Value>
97 template <
class Key,
class Value,
100 class Alloc = std::allocator<std::pair<const Key, Value>>>
103 absl::container_internal::NodeHashMapPolicy<Key, Value>, Hash, Eq,
178 using Base::capacity;
191 using Base::max_size;
300 using Base::insert_or_assign;
329 using Base::emplace_hint;
354 using Base::try_emplace;
427 using Base::contains;
442 using Base::equal_range;
466 using Base::operator[];
471 using Base::bucket_count;
477 using Base::load_factor;
495 using Base::max_load_factor;
500 using Base::get_allocator;
506 using Base::hash_function;
514 typename
Base::
hasher hash_funct() {
return this->hash_function(); }
520 namespace container_internal {
522 template <
class Key,
class Value>
523 class NodeHashMapPolicy
525 std::pair<const Key, Value>&, NodeHashMapPolicy<Key, Value>> {
533 template <
class Allocator,
class... Args>
536 Allocator>::template rebind_alloc<value_type>;
537 PairAlloc pair_alloc(*alloc);
541 std::forward<Args>(args)...);
545 template <
class Allocator>
548 Allocator>::template rebind_alloc<value_type>;
549 PairAlloc pair_alloc(*alloc);
554 template <
class F,
class... Args>
556 std::declval<F>(), std::declval<Args>()...))
557 apply(F&& f, Args&&... args) {
559 std::forward<Args>(args)...);
571 namespace container_algorithm_internal {
574 template <
class Key,
class T,
class Hash,
class KeyEqual,
class Allocator>
582 #endif // ABSL_CONTAINER_NODE_HASH_MAP_H_ hash_default_eq< T > key_eq
static void deallocate(Alloc &a, pointer p, size_type n)
ABSL_DEPRECATED("absl::bit_cast type requirements were violated. Update the types being " "used such that they are the same size and are both TriviallyCopyable.") inline Dest bit_cast(const Source &source)
static void destroy(Alloc &a, T *p)
static pointer allocate(Alloc &a, size_type n)
static value_type * new_element(Allocator *alloc, Args &&... args)
auto DecomposePair(F &&f, Args &&... args) -> decltype(memory_internal::DecomposePairImpl(std::forward< F >(f), PairArgs(std::forward< Args >(args)...)))
typename node_hash_map::raw_hash_map Base
typename container_internal::HashEq< T >::Hash hash_default_hash
static Value & value(value_type *elem)
static const Value & value(const value_type *elem)
std::pair< key_type, mapped_type > init_type
std::pair< const Key, Value > value_type
std::pair< std::string, std::string > pair
void swap(absl::InlinedVector< T, N, A > &a, absl::InlinedVector< T, N, A > &b) noexcept(noexcept(a.swap(b)))
auto apply(Functor &&functor, Tuple &&t) -> decltype(utility_internal::apply_helper(absl::forward< Functor >(functor), absl::forward< Tuple >(t), absl::make_index_sequence< std::tuple_size< typename std::remove_reference< Tuple >::type >::value >
typename container_internal::HashEq< T >::Eq hash_default_eq
static void delete_element(Allocator *alloc, value_type *pair)
std::allocator< int > alloc
static size_t element_space_used(const value_type *)
absl::hash_internal::Hash< T > Hash
static void construct(Alloc &a, T *p, Args &&... args)