Skip to content

Commit 707c922

Browse files
authored
Merge 2019-11 LWG Motion 3
P1690R1 Refinement Proposal for P0919 Heterogeneous lookup for unordered containers
2 parents 49e6076 + 5471093 commit 707c922

File tree

2 files changed

+13
-24
lines changed

2 files changed

+13
-24
lines changed

source/containers.tex

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2320,8 +2320,10 @@
23202320
\item \tcode{a_eq} denotes a value of type \tcode{X}
23212321
when \tcode{X} supports equivalent keys,
23222322
\item \tcode{a_tran} denotes a possibly const value of type \tcode{X}
2323-
when the \grammarterm{qualified-id} \tcode{X::hasher::transparent_key_equal}
2324-
is valid and denotes a type\iref{temp.deduct},
2323+
when the \grammarterm{qualified-id}s
2324+
\tcode{X::key_equal::is_transparent} and
2325+
\tcode{X::hasher::is_transparent}
2326+
are both valid and denote types\iref{temp.deduct},
23252327
\item \tcode{i} and \tcode{j} denote input iterators
23262328
that refer to \tcode{value_type},
23272329
\item \tcode{[i, j)} denotes a valid range,
@@ -2402,9 +2404,7 @@
24022404
%
24032405
\indexunordmem{key_equal}%
24042406
\tcode{X::key_equal}
2405-
& \tcode{Hash::transparent_key_equal} if such a \grammarterm{qualified-id}
2406-
is valid and denotes a type\iref{temp.deduct};
2407-
otherwise, \tcode{Pred}.
2407+
& \tcode{Pred}
24082408
& \expects \tcode{Pred} meets the \oldconcept{CopyConstructible} requirements.\br
24092409
\tcode{Pred} is a binary predicate that takes two arguments
24102410
of type \tcode{Key}. \tcode{Pred} is an equivalence relation.%
@@ -3036,22 +3036,13 @@
30363036
element is successfully inserted.
30373037

30383038
\pnum
3039-
If the \grammarterm{qualified-id} \tcode{Hash::transparent_key_equal}
3040-
is valid and denotes a type\iref{temp.deduct},
3041-
then the program is ill-formed if either:
3042-
\begin{itemize}
3043-
\item
3044-
\grammarterm{qualified-id} \tcode{Hash::transparent_key_equal::is_transparent}
3045-
is not valid or does not denote a type, or
3046-
\item
3047-
\tcode{Pred} is a different type than \tcode{equal_to<Key>} or
3048-
\tcode{Hash::transparent_key_equal}.
3049-
\end{itemize}
30503039
The member function templates
30513040
\tcode{find}, \tcode{count}, \tcode{equal_range}, and \tcode{contains}
30523041
shall not participate in overload resolution unless
3053-
the \grammarterm{qualified-id} \tcode{Hash::transparent_key_equal}
3054-
is valid and denotes a type\iref{temp.deduct}.
3042+
the \grammarterm{qualified-id}s
3043+
\tcode{Pred::is_transparent} and
3044+
\tcode{Hash::is_transparent}
3045+
are both valid and denote types\iref{temp.deduct}.
30553046

30563047
\pnum
30573048
A deduction guide for an unordered associative container shall not participate in overload resolution
@@ -7977,7 +7968,7 @@
79777968
using mapped_type = T;
79787969
using value_type = pair<const Key, T>;
79797970
using hasher = Hash;
7980-
using key_equal = @\seeref{unord.req}@;
7971+
using key_equal = Pred;
79817972
using allocator_type = Allocator;
79827973
using pointer = typename allocator_traits<Allocator>::pointer;
79837974
using const_pointer = typename allocator_traits<Allocator>::const_pointer;
@@ -8576,7 +8567,7 @@
85768567
using mapped_type = T;
85778568
using value_type = pair<const Key, T>;
85788569
using hasher = Hash;
8579-
using key_equal = @\seeref{unord.req}@;
8570+
using key_equal = Pred;
85808571
using allocator_type = Allocator;
85818572
using pointer = typename allocator_traits<Allocator>::pointer;
85828573
using const_pointer = typename allocator_traits<Allocator>::const_pointer;
@@ -8945,7 +8936,7 @@
89458936
using key_type = Key;
89468937
using value_type = Key;
89478938
using hasher = Hash;
8948-
using key_equal = @\seeref{unord.req}@;
8939+
using key_equal = Pred;
89498940
using allocator_type = Allocator;
89508941
using pointer = typename allocator_traits<Allocator>::pointer;
89518942
using const_pointer = typename allocator_traits<Allocator>::const_pointer;
@@ -9274,7 +9265,7 @@
92749265
using key_type = Key;
92759266
using value_type = Key;
92769267
using hasher = Hash;
9277-
using key_equal = @\seeref{unord.req}@;
9268+
using key_equal = Pred;
92789269
using allocator_type = Allocator;
92799270
using pointer = typename allocator_traits<Allocator>::pointer;
92809271
using const_pointer = typename allocator_traits<Allocator>::const_pointer;

source/macros.tex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,6 @@
328328
\newcommand{\unspecbool}{\UNSP{unspecified-bool-type}}
329329
\newcommand{\seebelow}{\UNSP{see below}}
330330
\newcommand{\seebelownc}{\UNSPnc{see below}}
331-
\newcommand{\seeref}[1]{\UNSP{see~\ref{#1}}}
332-
\newcommand{\seerefnc}[1]{\UNSPnc{see~\ref{#1}}}
333331
\newcommand{\unspecuniqtype}{\UNSP{unspecified unique type}}
334332
\newcommand{\unspecalloctype}{\UNSP{unspecified allocator type}}
335333

0 commit comments

Comments
 (0)