Skip to content
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
4 changes: 2 additions & 2 deletions src/constraints.tex
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@
This sequence is called the \defn{concept argument list}, and its elements
are called \defn{concept argument}{s}.
%
For the purpose this matching, a wildcard can match a template
For the purpose of this matching, a wildcard can match a template
parameter of any kind (type, non-type, template) as described below.

\pnum
Expand Down Expand Up @@ -995,7 +995,7 @@

\item a template parameter pack (\ref{temp.variadic}), matches zero or more
concept arguments, provided that each of those arguments matches the pattern
of the template parameter pack using the rules above for matching matching
of the template parameter pack using the rules above for matching
concept arguments and template parameters.
\end{itemize}
%
Expand Down
28 changes: 14 additions & 14 deletions src/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@
(\ref{expr.prim.req.compound}) introduces an argument deduction constraint
(\ref{temp.constr.deduct}).
%
The \tcode{auto} \grammarterm{type-specifier} is also introduce a function type
having a \grammarterm{trailing-return-type} or to introduce a structured binding
declaration \cxxref{dcl.struct.bind}.
The \tcode{auto} \grammarterm{type-specifier} is also used to introduce a
function type having a \grammarterm{trailing-return-type} or to introduce
a structured binding declaration \cxxref{dcl.struct.bind}.
%
\enternote
A \grammarterm{nested-name-specifier} can also include placeholders (\ref{expr.prim}).
Expand All @@ -183,8 +183,8 @@
return type of the function. Otherwise, the function declarator shall declare
a function.
%
If the declared return type of the function contains a placeholder, the
return type of the function is deduced from non-discarded return statements,
If the declared return type of the function contains a placeholder\removed{ type},
the return type of the function is deduced from non-discarded return statements,
if any, in the body of the function (\ref{stmt.if}).
%
\added{
Expand Down Expand Up @@ -314,7 +314,7 @@
\removed{\tcode{auto} or \tcode{decltype(auto)}}
is deduced from its initializer.
%
This use is allowed in an initializing declaration (\cxxref{11.6}) of a variable.
This use is allowed in an initializing declaration (\cxxref{dcl.init}) of a variable.
%
\removed{\tcode{auto} or \tcode{decltype(auto)} shall appear as one
of the \grammarterm{decl-specifier}{}s in the \grammarterm{decl-specifier-seq} }
Expand Down Expand Up @@ -395,7 +395,7 @@
\pnum
If the \grammarterm{init-declarator-list} contains more than one
\grammarterm{init-declarator}, they shall all form declarations of variables.
The type of each declared variable is determined is determined by placeholder
The type of each declared variable is determined by placeholder
type deduction (\ref{dcl.spec.auto.deduct}), and if
the type that replaces \removed{the placeholder type}
\added{the declared variable type or return type}
Expand Down Expand Up @@ -520,7 +520,7 @@
\removed{a deduced type} \added{deduced values (type, non-type, template)}.

\pnum
A type \tcode{T} containing a \removed{placeholder type}\added{placeholders},
A type \tcode{T} containing \removed{a placeholder type}\added{placeholders},
and a corresponding initializer \tcode{e},
are determined as follows:

Expand Down Expand Up @@ -561,6 +561,7 @@
% \tcode{T} shall be either \tcode{decltype(auto)}, \tcode{auto}, or a
% \grammarterm{constrained-type-specifier}.}

\setcounter{Paras}{3}
\pnum
If the placeholder is the \tcode{auto} \grammarterm{type-specifier}
\added{or a \grammarterm{constrained-type-specifier}}, the deduced type
Expand All @@ -570,14 +571,14 @@
\removed{Obtain \tcode{P} from
\tcode{T} by replacing the occurrences of \tcode{auto} with either a new
invented type template parameter \tcode{U} or,
if the initialization is copy-list-initialization, with
if the initialization is \grammarterm{copy-list-initialization}, with
\tcode{std::initializer_list<U>}.}
%
\begin{addedblock}
Otherwise, obtain a type \tcode{P} from \tcode{T} as follows:
Obtain a type \tcode{P} from \tcode{T} as follows:
\begin{itemize}
% FIXME: This doesn't do the right thing at all.
\item if the initialization is a copy-list-initialization
\item if the initialization is a \grammarterm{copy-list-initialization}
and a placeholder is a \grammarterm{decl-specifier} of the
\grammarterm{decl-specifier-seq} of the variable declaration, replace that
occurrence of the placeholder with \tcode{std::initializer_list<U>}
Expand Down Expand Up @@ -605,7 +606,7 @@
\grammarterm{constraint-expression} as follows:}
\begin{addedblock}
\begin{itemize}
\item if there is single \grammarterm{constrained-type-specifier},
\item if there is a single \grammarterm{constrained-type-specifier},
then \tcode{C} is the \grammarterm{constraint-expression} introduced
by the invented template \grammarterm{constrained-parameter} (\ref{temp.param})
corresponding to that \grammarterm{constrained-type-specifier};
Expand Down Expand Up @@ -713,7 +714,7 @@
The return type of \tcode{cf} is deduced from the parameter \tcode{p2} in the
call \tcode{f2(expr)} of the following invented function:
\begin{codeblock}
template<C T> void f2(Pair<T, T>);
template<C T> void f2(Pair<T, T> p2);
\end{codeblock}
Both \grammarterm{constrained-type-specifier}{}s in the return type of
\tcode{cf} correspond to the same invented template parameter.
Expand Down Expand Up @@ -762,7 +763,6 @@

template<typename T, int N> class Array { };
template<typename T, template<typename> class A> class Stack { };
template<typename T> class Alloc { };

void f1(C1); // \tcode{C1} designates a placeholder type
void f2(Array<auto, C2>); // \tcode{C2} designates a placeholder for an integer value
Expand Down