Skip to content

Commit 0862766

Browse files
jensmaurerzygoloid
authored andcommitted
P1661R1 Remove dedicated precalculated hash lookup interface
1 parent 6dfc32e commit 0862766

File tree

2 files changed

+2
-146
lines changed

2 files changed

+2
-146
lines changed

source/containers.tex

Lines changed: 2 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -2292,9 +2292,8 @@
22922292
\end{itemize}
22932293
where \tcode{r1} and \tcode{r2} are keys of elements in \tcode{a_tran},
22942294
\item \tcode{n} denotes a value of type \tcode{size_type},
2295-
\item \tcode{z} denotes a value of type \tcode{float},
2296-
\item \tcode{nh} denotes a non-const rvalue of type \tcode{X::node_type}, and
2297-
\item \tcode{hk} and \tcode{hke} denote values of type \tcode{size_t}.
2295+
\item \tcode{z} denotes a value of type \tcode{float}, and
2296+
\item \tcode{nh} denotes a non-const rvalue of type \tcode{X::node_type}.
22982297
\end{itemize}
22992298

23002299
% Local command to index names as members of all unordered containers.
@@ -2748,14 +2747,6 @@
27482747
& Average case \bigoh{1}, worst case \bigoh{\tcode{b.size()}}.
27492748
\\ \rowsep
27502749
%
2751-
\tcode{b.find(k, hk)}
2752-
& \tcode{iterator}; \br \tcode{const_iterator} for const \tcode{b}.
2753-
& \expects \tcode{b.hash_function()(k)} equals \tcode{hk}.\br
2754-
\returns An iterator pointing to an element with key equivalent to
2755-
\tcode{k}, or \tcode{b.end()} if no such element exists.
2756-
& Average case \bigoh{1}, worst case \bigoh{\tcode{b.size()}}.
2757-
\\ \rowsep
2758-
%
27592750
\tcode{a_tran.find(ke)}
27602751
& \tcode{iterator}; \br \tcode{const_iterator} for const \tcode{a_tran}.
27612752
& \returns An iterator pointing to an element with key equivalent to
@@ -2764,29 +2755,13 @@
27642755
worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull
27652756
\\ \rowsep
27662757
%
2767-
\tcode{a_tran.find(ke, hke)}
2768-
& \tcode{iterator}; \br \tcode{const_iterator} for const \tcode{a_tran}.
2769-
& \expects \tcode{a_tran.hash_function()(ke)} equals \tcode{hke}.\br
2770-
\returns An iterator pointing to an element with key equivalent to
2771-
\tcode{ke}, or \tcode{a_tran.end()} if no such element exists.%
2772-
& Average case \bigoh{1},
2773-
worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull
2774-
\\ \rowsep
2775-
%
27762758
\indexunordmem{count}%
27772759
\tcode{b.count(k)}
27782760
& \tcode{size_type}
27792761
& \returns The number of elements with key equivalent to \tcode{k}.%
27802762
& Average case \bigoh{\tcode{b.count(k)}}, worst case \bigoh{\tcode{b.size()}}.
27812763
\\ \rowsep
27822764
%
2783-
\tcode{b.count(k, hk)}
2784-
& \tcode{size_type}
2785-
& \expects \tcode{b.hash_function()(k)} equals \tcode{hk}.\br
2786-
\returns The number of elements with key equivalent to \tcode{k}.%
2787-
& Average case \bigoh{\tcode{b.count(k)}}, worst case \bigoh{\tcode{b.size()}}.
2788-
\\ \rowsep
2789-
%
27902765
\tcode{a_tran.count(ke)}
27912766
& \tcode{size_type}
27922767
& \returns The number of elements with key equivalent to \tcode{ke}.%
@@ -2795,44 +2770,20 @@
27952770
worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull
27962771
\\ \rowsep
27972772
%
2798-
\tcode{a_tran.count(ke, hke)}
2799-
& \tcode{size_type}
2800-
& \expects \tcode{b.hash_function()(ke)} equals \tcode{hke}.\br
2801-
\returns The number of elements with key equivalent to \tcode{ke}.%
2802-
& Average case
2803-
\bigoh{\tcode{a_tran.}\br{}\tcode{count(ke)}}, % avoid overfull
2804-
worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull
2805-
\\ \rowsep
2806-
%
28072773
\indexunordmem{contains}%
28082774
\tcode{b.contains(k)}
28092775
& \tcode{bool}
28102776
& \effects Equivalent to \tcode{b.find(k) != b.end()}%
28112777
& Average case \bigoh{1}, worst case \bigoh{\tcode{b.size()}}.
28122778
\\ \rowsep
28132779
%
2814-
\tcode{b.contains(k, hk)}
2815-
& \tcode{bool}
2816-
& \expects \tcode{b.hash_function()(ke)} equals \tcode{hke}.\br
2817-
\effects Equivalent to \tcode{b.find(k) != b.end()}%
2818-
& Average case \bigoh{1}, worst case \bigoh{\tcode{b.size()}}.
2819-
\\ \rowsep
2820-
%
28212780
\tcode{a_tran.contains(ke)}
28222781
& \tcode{bool}
28232782
& \effects Equivalent to \tcode{a_tran.find(ke) != a_tran.end()}%
28242783
& Average case \bigoh{1},
28252784
worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull
28262785
\\ \rowsep
28272786
%
2828-
\tcode{a_tran.contains(ke, hke)}
2829-
& \tcode{bool}
2830-
& \expects \tcode{a_tran.hash_function()(ke)} equals \tcode{hke}.\br
2831-
\effects Equivalent to \tcode{a_tran.find(ke, hke) != a_tran.end()}%
2832-
& Average case \bigoh{1},
2833-
worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull
2834-
\\ \rowsep
2835-
%
28362787
\indexunordmem{equal_range}%
28372788
\tcode{b.equal_range(k)}
28382789
& \tcode{pair<iterator, iterator>}; \br
@@ -2844,17 +2795,6 @@
28442795
\bigoh{\tcode{b.size()}}.
28452796
\\ \rowsep
28462797
%
2847-
\tcode{b.equal_range(k, hk)}
2848-
& \tcode{pair<iterator, iterator>}; \br
2849-
\tcode{pair<const_iterator, const_iterator>} for const \tcode{b}.
2850-
& \expects \tcode{b.hash_function()(k)} equals \tcode{hk}.\br
2851-
\returns A range containing all elements with keys equivalent to
2852-
\tcode{k}. Returns \tcode{make_pair(b.end(), b.end())} if
2853-
no such elements exist.%
2854-
& Average case \bigoh{\tcode{b.count(k)}}, worst case
2855-
\bigoh{\tcode{b.size()}}.
2856-
\\ \rowsep
2857-
%
28582798
\tcode{a_tran.equal_range(ke)}
28592799
& \tcode{pair<iterator, iterator>}; \br
28602800
\tcode{pair<const_iterator, const_iterator>} for const \tcode{a_tran}.
@@ -2866,17 +2806,6 @@
28662806
worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull
28672807
\\ \rowsep
28682808
%
2869-
\tcode{a_tran.equal_range(ke, hke)}
2870-
& \tcode{pair<iterator, iterator>}; \br
2871-
\tcode{pair<const_iterator, const_iterator>} for const \tcode{a_tran}.
2872-
& \expects \tcode{a_tran.hash_function()(ke)} equals \tcode{hke}.\br
2873-
\returns A range containing all elements with keys equivalent to
2874-
\tcode{ke}. Returns \tcode{make_pair(a_tran.end(), a_tran.end())} if
2875-
no such elements exist.%
2876-
& Average case
2877-
\bigoh{\tcode{a_tran.}\br{}\tcode{count(ke)}}, % avoid overfull
2878-
worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull
2879-
\\ \rowsep
28802809
\indexunordmem{bucket_count}%
28812810
\tcode{b.bucket_count()}
28822811
& \tcode{size_type}
@@ -7989,40 +7918,23 @@
79897918
// map operations
79907919
iterator find(const key_type& k);
79917920
const_iterator find(const key_type& k) const;
7992-
iterator find(const key_type& k, size_t hash);
7993-
const_iterator find(const key_type& k, size_t hash) const;
79947921
template<class K>
79957922
iterator find(const K& k);
79967923
template<class K>
79977924
const_iterator find(const K& k) const;
79987925
template<class K>
7999-
iterator find(const K& k, size_t hash);
8000-
template<class K>
8001-
const_iterator find(const K& k, size_t hash) const;
80027926
size_type count(const key_type& k) const;
8003-
size_type count(const key_type& k, size_t hash) const;
80047927
template<class K>
80057928
size_type count(const K& k) const;
8006-
template<class K>
8007-
size_type count(const K& k, size_t hash) const;
80087929
bool contains(const key_type& k) const;
8009-
bool contains(const key_type& k, size_t hash) const;
80107930
template<class K>
80117931
bool contains(const K& k) const;
8012-
template<class K>
8013-
bool contains(const K& k, size_t hash) const;
80147932
pair<iterator, iterator> equal_range(const key_type& k);
80157933
pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
8016-
pair<iterator, iterator> equal_range(const key_type& k, size_t hash);
8017-
pair<const_iterator, const_iterator> equal_range(const key_type& k, size_t hash) const;
80187934
template<class K>
80197935
pair<iterator, iterator> equal_range(const K& k);
80207936
template<class K>
80217937
pair<const_iterator, const_iterator> equal_range(const K& k) const;
8022-
template<class K>
8023-
pair<iterator, iterator> equal_range(const K& k, size_t hash);
8024-
template<class K>
8025-
pair<const_iterator, const_iterator> equal_range(const K& k, size_t hash) const;
80267938

80277939
// \ref{unord.map.elem}, element access
80287940
mapped_type& operator[](const key_type& k);
@@ -8577,40 +8489,22 @@
85778489
// map operations
85788490
iterator find(const key_type& k);
85798491
const_iterator find(const key_type& k) const;
8580-
iterator find(const key_type& k, size_t hash);
8581-
const_iterator find(const key_type& k, size_t hash) const;
85828492
template<class K>
85838493
iterator find(const K& k);
85848494
template<class K>
85858495
const_iterator find(const K& k) const;
8586-
template<class K>
8587-
iterator find(const K& k, size_t hash);
8588-
template<class K>
8589-
const_iterator find(const K& k, size_t hash) const;
85908496
size_type count(const key_type& k) const;
8591-
size_type count(const key_type& k, size_t hash) const;
85928497
template<class K>
85938498
size_type count(const K& k) const;
8594-
template<class K>
8595-
size_type count(const K& k, size_t hash) const;
85968499
bool contains(const key_type& k) const;
8597-
bool contains(const key_type& k, size_t hash) const;
85988500
template<class K>
85998501
bool contains(const K& k) const;
8600-
template<class K>
8601-
bool contains(const K& k, size_t hash) const;
86028502
pair<iterator, iterator> equal_range(const key_type& k);
86038503
pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
8604-
pair<iterator, iterator> equal_range(const key_type& k, size_t hash);
8605-
pair<const_iterator, const_iterator> equal_range(const key_type& k, size_t hash) const;
86068504
template<class K>
86078505
pair<iterator, iterator> equal_range(const K& k);
86088506
template<class K>
86098507
pair<const_iterator, const_iterator> equal_range(const K& k) const;
8610-
template<class K>
8611-
pair<iterator, iterator> equal_range(const K& k, size_t hash);
8612-
template<class K>
8613-
pair<const_iterator, const_iterator> equal_range(const K& k, size_t hash) const;
86148508

86158509
// bucket interface
86168510
size_type bucket_count() const noexcept;
@@ -8957,40 +8851,22 @@
89578851
// set operations
89588852
iterator find(const key_type& k);
89598853
const_iterator find(const key_type& k) const;
8960-
iterator find(const key_type& k, size_t hash);
8961-
const_iterator find(const key_type& k, size_t hash) const;
89628854
template<class K>
89638855
iterator find(const K& k);
89648856
template<class K>
89658857
const_iterator find(const K& k) const;
8966-
template<class K>
8967-
iterator find(const K& k, size_t hash);
8968-
template<class K>
8969-
const_iterator find(const K& k, size_t hash) const;
89708858
size_type count(const key_type& k) const;
8971-
size_type count(const key_type& k, size_t hash) const;
89728859
template<class K>
89738860
size_type count(const K& k) const;
8974-
template<class K>
8975-
size_type count(const K& k, size_t hash) const;
89768861
bool contains(const key_type& k) const;
8977-
bool contains(const key_type& k, size_t hash) const;
89788862
template<class K>
89798863
bool contains(const K& k) const;
8980-
template<class K>
8981-
bool contains(const K& k, size_t hash) const;
89828864
pair<iterator, iterator> equal_range(const key_type& k);
89838865
pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
8984-
pair<iterator, iterator> equal_range(const key_type& k, size_t hash);
8985-
pair<const_iterator, const_iterator> equal_range(const key_type& k, size_t hash) const;
89868866
template<class K>
89878867
pair<iterator, iterator> equal_range(const K& k);
89888868
template<class K>
89898869
pair<const_iterator, const_iterator> equal_range(const K& k) const;
8990-
template<class K>
8991-
pair<iterator, iterator> equal_range(const K& k, size_t hash);
8992-
template<class K>
8993-
pair<const_iterator, const_iterator> equal_range(const K& k, size_t hash) const;
89948870

89958871
// bucket interface
89968872
size_type bucket_count() const noexcept;
@@ -9299,40 +9175,22 @@
92999175
// set operations
93009176
iterator find(const key_type& k);
93019177
const_iterator find(const key_type& k) const;
9302-
iterator find(const key_type& k, size_t hash);
9303-
const_iterator find(const key_type& k, size_t hash) const;
93049178
template<class K>
93059179
iterator find(const K& k);
93069180
template<class K>
93079181
const_iterator find(const K& k) const;
9308-
template<class K>
9309-
iterator find(const K& k, size_t hash);
9310-
template<class K>
9311-
const_iterator find(const K& k, size_t hash) const;
93129182
size_type count(const key_type& k) const;
9313-
size_type count(const key_type& k, size_t hash) const;
93149183
template<class K>
93159184
size_type count(const K& k) const;
9316-
template<class K>
9317-
size_type count(const K& k, size_t hash) const;
93189185
bool contains(const key_type& k) const;
9319-
bool contains(const key_type& k, size_t hash) const;
93209186
template<class K>
93219187
bool contains(const K& k) const;
9322-
template<class K>
9323-
bool contains(const K& k, size_t hash) const;
93249188
pair<iterator, iterator> equal_range(const key_type& k);
93259189
pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
9326-
pair<iterator, iterator> equal_range(const key_type& k, size_t hash);
9327-
pair<const_iterator, const_iterator> equal_range(const key_type& k, size_t hash) const;
93289190
template<class K>
93299191
pair<iterator, iterator> equal_range(const K& k);
93309192
template<class K>
93319193
pair<const_iterator, const_iterator> equal_range(const K& k) const;
9332-
template<class K>
9333-
pair<iterator, iterator> equal_range(const K& k, size_t hash);
9334-
template<class K>
9335-
pair<const_iterator, const_iterator> equal_range(const K& k, size_t hash) const;
93369194

93379195
// bucket interface
93389196
size_type bucket_count() const noexcept;

source/support.tex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,6 @@
610610
\tcode{<map>} \tcode{<set>} \\ \rowsep
611611
\defnlibxname{cpp_lib_generic_unordered_lookup} & \tcode{201811L} &
612612
\tcode{<unordered_map>} \tcode{<unordered_set>} \\ \rowsep
613-
\defnlibxname{cpp_lib_generic_unordered_hash_lookup} & \tcode{201902L} &
614-
\tcode{<unordered_map>} \tcode{<unordered_set>} \\ \rowsep
615613
\defnlibxname{cpp_lib_hardware_interference_size} & \tcode{201703L} &
616614
\tcode{<new>} \\ \rowsep
617615
\defnlibxname{cpp_lib_has_unique_object_representations} & \tcode{201606L} &

0 commit comments

Comments
 (0)