Skip to content

P1690R1 Refinement Proposal for P0919 Heterogeneous lookup for unordered containers #3445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 13 additions & 22 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2320,8 +2320,10 @@
\item \tcode{a_eq} denotes a value of type \tcode{X}
when \tcode{X} supports equivalent keys,
\item \tcode{a_tran} denotes a possibly const value of type \tcode{X}
when the \grammarterm{qualified-id} \tcode{X::hasher::transparent_key_equal}
is valid and denotes a type\iref{temp.deduct},
when the \grammarterm{qualified-id}s
\tcode{X::key_equal::is_transparent} and
\tcode{X::hasher::is_transparent}
are both valid and denote types\iref{temp.deduct},
\item \tcode{i} and \tcode{j} denote input iterators
that refer to \tcode{value_type},
\item \tcode{[i, j)} denotes a valid range,
Expand Down Expand Up @@ -2402,9 +2404,7 @@
%
\indexunordmem{key_equal}%
\tcode{X::key_equal}
& \tcode{Hash::transparent_key_equal} if such a \grammarterm{qualified-id}
is valid and denotes a type\iref{temp.deduct};
otherwise, \tcode{Pred}.
& \tcode{Pred}
& \expects \tcode{Pred} meets the \oldconcept{CopyConstructible} requirements.\br
\tcode{Pred} is a binary predicate that takes two arguments
of type \tcode{Key}. \tcode{Pred} is an equivalence relation.%
Expand Down Expand Up @@ -3036,22 +3036,13 @@
element is successfully inserted.

\pnum
If the \grammarterm{qualified-id} \tcode{Hash::transparent_key_equal}
is valid and denotes a type\iref{temp.deduct},
then the program is ill-formed if either:
\begin{itemize}
\item
\grammarterm{qualified-id} \tcode{Hash::transparent_key_equal::is_transparent}
is not valid or does not denote a type, or
\item
\tcode{Pred} is a different type than \tcode{equal_to<Key>} or
\tcode{Hash::transparent_key_equal}.
\end{itemize}
The member function templates
\tcode{find}, \tcode{count}, \tcode{equal_range}, and \tcode{contains}
shall not participate in overload resolution unless
the \grammarterm{qualified-id} \tcode{Hash::transparent_key_equal}
is valid and denotes a type\iref{temp.deduct}.
the \grammarterm{qualified-id}s
\tcode{Pred::is_transparent} and
\tcode{Hash::is_transparent}
are both valid and denote types\iref{temp.deduct}.

\pnum
A deduction guide for an unordered associative container shall not participate in overload resolution
Expand Down Expand Up @@ -7977,7 +7968,7 @@
using mapped_type = T;
using value_type = pair<const Key, T>;
using hasher = Hash;
using key_equal = @\seeref{unord.req}@;
using key_equal = Pred;
using allocator_type = Allocator;
using pointer = typename allocator_traits<Allocator>::pointer;
using const_pointer = typename allocator_traits<Allocator>::const_pointer;
Expand Down Expand Up @@ -8576,7 +8567,7 @@
using mapped_type = T;
using value_type = pair<const Key, T>;
using hasher = Hash;
using key_equal = @\seeref{unord.req}@;
using key_equal = Pred;
using allocator_type = Allocator;
using pointer = typename allocator_traits<Allocator>::pointer;
using const_pointer = typename allocator_traits<Allocator>::const_pointer;
Expand Down Expand Up @@ -8945,7 +8936,7 @@
using key_type = Key;
using value_type = Key;
using hasher = Hash;
using key_equal = @\seeref{unord.req}@;
using key_equal = Pred;
using allocator_type = Allocator;
using pointer = typename allocator_traits<Allocator>::pointer;
using const_pointer = typename allocator_traits<Allocator>::const_pointer;
Expand Down Expand Up @@ -9274,7 +9265,7 @@
using key_type = Key;
using value_type = Key;
using hasher = Hash;
using key_equal = @\seeref{unord.req}@;
using key_equal = Pred;
using allocator_type = Allocator;
using pointer = typename allocator_traits<Allocator>::pointer;
using const_pointer = typename allocator_traits<Allocator>::const_pointer;
Expand Down
2 changes: 0 additions & 2 deletions source/macros.tex
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,6 @@
\newcommand{\unspecbool}{\UNSP{unspecified-bool-type}}
\newcommand{\seebelow}{\UNSP{see below}}
\newcommand{\seebelownc}{\UNSPnc{see below}}
\newcommand{\seeref}[1]{\UNSP{see~\ref{#1}}}
\newcommand{\seerefnc}[1]{\UNSPnc{see~\ref{#1}}}
\newcommand{\unspecuniqtype}{\UNSP{unspecified unique type}}
\newcommand{\unspecalloctype}{\UNSP{unspecified allocator type}}

Expand Down