Skip to content

[over.match.best] Define 'worst conversion sequence' #4810

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
10 changes: 9 additions & 1 deletion source/overloading.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1811,6 +1811,14 @@
\end{codeblock}
\end{example}

\pnum
Given a set of implicit conversion sequences,
a \defnadj{worst}{conversion sequence} $S$ in the set
is a conversion sequence
such that $S$ is not a better conversion sequence
than any other conversion sequence in the set and
at least one other conversion sequence is a better conversion sequence than $S$.

\rSec3[over.best.ics]{Implicit conversion sequences}%

\rSec4[over.best.ics.general]{General}%
Expand Down Expand Up @@ -2232,7 +2240,7 @@
Otherwise, if the parameter type is \tcode{std::initializer_list<X>}
and all the elements
of the initializer list can be implicitly converted to \tcode{X}, the implicit
conversion sequence is the worst conversion necessary to convert an element of
conversion sequence is the worst conversion sequence\iref{over.match.best.general} necessary to convert an element of
the list to \tcode{X}, or if the initializer list has no elements, the identity
conversion. This conversion can be a user-defined conversion even in
the context of a call to an initializer-list constructor.
Expand Down