Iros
 
Loading...
Searching...
No Matches
node_hash_multimap.h
Go to the documentation of this file.
1#pragma once
2
14#include "di/function/compare.h"
15#include "di/function/equal.h"
16#include "di/platform/prelude.h"
19
20namespace di::container {
21template<typename Key, typename Value, typename Eq = function::Equal, concepts::Hasher Hasher = DefaultHasher,
22 typename Buckets = container::Vector<
24 concepts::Allocator Alloc = platform::DefaultAllocator>
26 : public OwningNodeHashTable<
27 Tuple<Key, Value>, Eq, Hasher, Buckets, detail::NodeHashMapTag<Key, Value>, Alloc,
28 MapInterface<
29 NodeHashMultiMap<Key, Value, Eq, Hasher, Buckets, Alloc>, Tuple<Key, Value>, Key, Value,
30 HashNodeIterator<Tuple<Key, Value>, detail::NodeHashMapTag<Key, Value>>,
31 container::ConstIteratorImpl<HashNodeIterator<Tuple<Key, Value>, detail::NodeHashMapTag<Key, Value>>>,
32 detail::NodeHashTableMapValidForLookup<Key, Value, Eq>::template Type, true>,
33 true, true> {
34private:
35 using Base = OwningNodeHashTable<
36 Tuple<Key, Value>, Eq, Hasher, Buckets, detail::NodeHashMapTag<Key, Value>, Alloc,
42 true, true>;
43
44public:
45 NodeHashMultiMap() = default;
46
47 NodeHashMultiMap(Eq, Hasher, Buckets const& comparator) : Base(Eq { comparator }) {}
48};
49
50template<concepts::InputContainer Con, concepts::TupleLike T = meta::ContainerValue<Con>>
51requires(meta::TupleSize<T> == 2)
54
55template<concepts::InputContainer Con, concepts::TupleLike T = meta::ContainerValue<Con>, typename Eq>
56requires(meta::TupleSize<T> == 2)
59
60template<concepts::InputContainer Con, concepts::TupleLike T = meta::ContainerValue<Con>, typename Eq, typename Hasher>
61requires(meta::TupleSize<T> == 2)
64}
65
66namespace di {
68}
Definition const_iterator_impl.h:19
Definition hash_node_iterator.h:15
Definition forward_list_forward_declaration.h:12
Definition map_interface.h:21
Definition node_hash_multimap.h:33
NodeHashMultiMap(Eq, Hasher, Buckets const &comparator)
Definition node_hash_multimap.h:47
Definition owning_node_hash_table.h:59
Definition tuple_forward_declaration.h:5
Definition sequence.h:12
constexpr auto TupleSize
Definition tuple_size.h:23
decltype(vocab::tuple_element(types::in_place_type< meta::RemoveReference< T > >, c_< index >))::Type TupleElement
Definition tuple_element.h:21
container::InfallibleAllocator DefaultAllocator
Definition custom.h:39
di::meta::Decay< decltype(T)> Tag
Definition tag_invoke.h:28
Definition zstring_parser.h:9
constexpr tag_invoke_detail::TagInvokeFn tag_invoke
Definition tag_invoke.h:22
Key
Definition key.h:8
Definition default_hasher.h:7
Definition node_hash_map.h:22
Definition in_place_template.h:5