Skip to content

Commit

Permalink
Replace Ti with $\tcode{T}_i$ for proper indexes.
Browse files Browse the repository at this point in the history
And similar for Ui, Vi, and TiD; the latter becoming $\tcode{TD}_i$.

Partially addresses cplusplus#1139.
  • Loading branch information
jensmaurer committed Dec 20, 2016
1 parent a925ccb commit 73d0d81
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions source/threads.tex
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@

\begin{itemdescr}
\pnum
\requires\ \tcode{F} and each \tcode{Ti} in \tcode{Args} shall satisfy the
\requires\ \tcode{F} and each $\tcode{T}_i$ in \tcode{Args} shall satisfy the
\tcode{MoveConstructible} requirements.
\tcode{\textit{INVOKE}(\textit{DECAY_COPY}(}
\tcode{std::forward<F>(f)), \textit{DECAY_COPY}(std::forward<Args>(args))...)}~(\ref{func.require}) shall be
Expand Down Expand Up @@ -4695,7 +4695,7 @@

\begin{itemdescr}
\pnum
\requires \tcode{F} and each \tcode{Ti} in \tcode{Args} shall
\requires \tcode{F} and each $\tcode{T}_i$ in \tcode{Args} shall
satisfy the
\tcode{MoveConstructible} requirements, and
\begin{codeblock}
Expand Down
56 changes: 28 additions & 28 deletions source/utilities.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1249,10 +1249,10 @@
\begin{itemdescr}
\pnum
\returns \tcode{pair<V1, V2>(std::forward<T1>(x), std::forward<T2>(y))},
where \tcode{V1} and \tcode{V2} are determined as follows: Let \tcode{Ui} be
\tcode{decay_t<Ti>} for each \tcode{Ti}. If \tcode{Ui} is a specialization
of \tcode{reference_wrapper}, then \tcode{Vi} is \tcode{Ui::type\&},
otherwise \tcode{Vi} is \tcode{Ui}.
where \tcode{V1} and \tcode{V2} are determined as follows: Let $\tcode{U}_i$ be
\tcode{decay_t<$\tcode{T}_i$>} for each $\tcode{T}_i$. If $\tcode{U}_i$ is a specialization
of \tcode{reference_wrapper}, then $\tcode{V}_i$ is \tcode{$\tcode{U}_i$::type\&},
otherwise $\tcode{V}_i$ is $\tcode{U}_i$.
\end{itemdescr}

\pnum
Expand Down Expand Up @@ -2053,7 +2053,7 @@
\begin{itemdescr}
\pnum
In the following paragraphs, let $\tcode{T}_i$ be the $i^{th}$ type in \tcode{Tuples},
$\tcode{U}_i$ be \tcode{remove_reference_t<Ti>}, and $tp_i$ be the $i^{th}$
$\tcode{U}_i$ be \tcode{remove_reference_t<$\tcode{T}_i$>}, and $tp_i$ be the $i^{th}$
parameter in the function parameter pack \tcode{tpls}, where all indexing is
zero-based.

Expand Down Expand Up @@ -14022,10 +14022,10 @@
\begin{itemize}
\item \tcode{FD} is the type \tcode{decay_t<F>},
\item \tcode{fd} is an lvalue of type \tcode{FD} constructed from \tcode{std::forward<F>(f)},
\item \tcode{Ti} is the $i^{th}$ type in the template parameter pack \tcode{BoundArgs},
\item \tcode{TiD} is the type \tcode{decay_t<Ti>},
\item $\tcode{T}_i$ is the $i^{th}$ type in the template parameter pack \tcode{BoundArgs},
\item $\tcode{TD}_i$ is the type \tcode{decay_t<$\tcode{T}_i$>},
\item \tcode{ti} is the $i^{th}$ argument in the function parameter pack \tcode{bound_args},
\item \tcode{tid} is an lvalue of type \tcode{TiD} constructed from \tcode{std::forward<Ti>(ti)},
\item \tcode{tid} is an lvalue of type $\tcode{TD}_i$ constructed from \tcode{std::forward<$\tcode{T}_i$>(ti)},
\item \tcode{Uj} is the $j^{th}$ deduced type of the \tcode{UnBoundArgs\&\&...} parameter
of the forwarding call wrapper, and
\item \tcode{uj} is the $j^{th}$ argument associated with \tcode{Uj}.
Expand All @@ -14040,8 +14040,8 @@
\begin{itemdescr}
\pnum
\requires
\tcode{is_constructible_v<FD, F>} shall be \tcode{true}. For each \tcode{Ti}
in \tcode{BoundArgs}, \tcode{is_cons\-tructible_v<TiD, Ti>} shall be \tcode{true}.
\tcode{is_constructible_v<FD, F>} shall be \tcode{true}. For each $\tcode{T}_i$
in \tcode{BoundArgs}, \tcode{is_cons\-tructible_v<$\tcode{TD}_i$, $\tcode{T}_i$>} shall be \tcode{true}.
\tcode{\textit{INVOKE} (fd, w1, w2, ...,
wN)}~(\ref{func.require}) shall be a valid expression for some
values \textit{w1, w2, ..., wN}, where
Expand All @@ -14057,17 +14057,17 @@
arguments \tcode{v1, v2, ..., vN} are determined as specified below.
The copy constructor and move constructor of the forwarding call wrapper shall throw an
exception if and only if the corresponding constructor of \tcode{FD} or of any of the types
\tcode{TiD} throws an exception.
$\tcode{TD}_i$ throws an exception.

\pnum
\throws Nothing unless the construction of
\tcode{fd} or of one of the values \tcode{tid} throws an exception.

\pnum
\remarks The return type shall satisfy the requirements of \tcode{MoveConstructible}. If all
of \tcode{FD} and \tcode{TiD} satisfy the requirements of \tcode{CopyConstructible}, then the
of \tcode{FD} and $\tcode{TD}_i$ satisfy the requirements of \tcode{CopyConstructible}, then the
return type shall satisfy the requirements of \tcode{CopyConstructible}. \begin{note} This implies
that all of \tcode{FD} and \tcode{TiD} are \tcode{MoveConstructible}. \end{note}
that all of \tcode{FD} and $\tcode{TD}_i$ are \tcode{MoveConstructible}. \end{note}
\end{itemdescr}

\indexlibrary{\idxcode{bind}}%
Expand All @@ -14079,8 +14079,8 @@
\begin{itemdescr}
\pnum
\requires
\tcode{is_constructible_v<FD, F>} shall be \tcode{true}. For each \tcode{Ti}
in \tcode{BoundArgs}, \tcode{is_con\-structible_v<TiD, Ti>} shall be \tcode{true}.
\tcode{is_constructible_v<FD, F>} shall be \tcode{true}. For each $\tcode{T}_i$
in \tcode{BoundArgs}, \tcode{is_con\-structible_v<$\tcode{TD}_i$, $\tcode{T}_i$>} shall be \tcode{true}.
\tcode{\textit{INVOKE}(fd, w1, w2, ..., wN)} shall be a valid
expression for some
values \textit{w1, w2, ..., wN}, where
Expand All @@ -14098,43 +14098,43 @@
arguments \tcode{v1, v2, ..., vN} are determined as specified below.
The copy constructor and move constructor of the forwarding call wrapper shall throw an
exception if and only if the corresponding constructor of \tcode{FD} or of any of the types
\tcode{TiD} throws an exception.
$\tcode{TD}_i$ throws an exception.

\pnum
\throws Nothing unless the construction of
\tcode{fd} or of one of the values \tcode{tid} throws an exception.

\pnum
\remarks The return type shall satisfy the requirements of \tcode{MoveConstructible}. If all
of \tcode{FD} and \tcode{TiD} satisfy the requirements of \tcode{CopyConstructible}, then the
of \tcode{FD} and $\tcode{TD}_i$ satisfy the requirements of \tcode{CopyConstructible}, then the
return type shall satisfy the requirements of \tcode{CopyConstructible}. \begin{note} This implies
that all of \tcode{FD} and \tcode{TiD} are \tcode{MoveConstructible}. \end{note}
that all of \tcode{FD} and $\tcode{TD}_i$ are \tcode{MoveConstructible}. \end{note}
\end{itemdescr}

\pnum
\indextext{bound arguments}%
The values of the \techterm{bound arguments} \tcode{v1, v2, ..., vN} and their
corresponding types \tcode{V1, V2, ..., VN} depend on the
types \tcode{TiD} derived from
types $\tcode{TD}_i$ derived from
the call to \tcode{bind} and the
cv-qualifiers \cv{} of the call wrapper \tcode{g} as follows:

\begin{itemize}
\item if \tcode{TiD} is \tcode{reference_wrapper<T>}, the
argument is \tcode{tid.get()} and its type \tcode{Vi} is \tcode{T\&};
\item if $\tcode{TD}_i$ is \tcode{reference_wrapper<T>}, the
argument is \tcode{tid.get()} and its type $\tcode{V}_i$ is \tcode{T\&};

\item if the value of \tcode{is_bind_expression_v<TiD>}
\item if the value of \tcode{is_bind_expression_v<$\tcode{TD}_i$>}
is \tcode{true}, the argument is \tcode{tid(std::forward<Uj>(\brk{}uj)...)} and its
type \tcode{Vi} is
\tcode{result_of_t<TiD \cv{} \& (Uj\&\&...)>\&\&};
type $\tcode{V}_i$ is
\tcode{result_of_t<$\tcode{TD}_i$ \cv{} \& (Uj\&\&...)>\&\&};

\item if the value \tcode{j} of \tcode{is_placeholder_v<TiD>}
\item if the value \tcode{j} of \tcode{is_placeholder_v<$\tcode{TD}_i$>}
is not zero, the argument is \tcode{std::forward<Uj>(uj)}
and its type \tcode{Vi}
and its type $\tcode{V}_i$
is \tcode{Uj\&\&};

\item otherwise, the value is \tcode{tid} and its type \tcode{Vi}
is \tcode{TiD \cv{} \&}.
\item otherwise, the value is \tcode{tid} and its type $\tcode{V}_i$
is \tcode{$\tcode{TD}_i$ \cv{} \&}.
\end{itemize}

\rSec3[func.bind.place]{Placeholders}
Expand Down

0 comments on commit 73d0d81

Please sign in to comment.