From 69883f8521c9dc63d02a4f7b07c3fc93d98c4cec Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Sat, 24 Jun 2017 05:13:48 -0400 Subject: [PATCH 01/13] Filled in some missing words in 10.1.7.4 [dcl.spec.auto] paragraph 1. "The auto type-specifier is also *used to* introduce a function type..." --- src/declarations.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/declarations.tex b/src/declarations.tex index 8ca56e4..a61355e 100644 --- a/src/declarations.tex +++ b/src/declarations.tex @@ -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}). From 05a30f66eca14bd5c8e95e287461aa51a64989a6 Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Sat, 24 Jun 2017 05:29:58 -0400 Subject: [PATCH 02/13] Restored a deleted word in 10.1.7.4 [dcl.spec.auto] paragraph 2 and marked it as removed. --- src/declarations.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarations.tex b/src/declarations.tex index a61355e..c15e532 100644 --- a/src/declarations.tex +++ b/src/declarations.tex @@ -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{ From b1a360ff09f0c43bbec751805b6f3e4a70fef6ba Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Sat, 24 Jun 2017 05:37:51 -0400 Subject: [PATCH 03/13] Corrected a section reference in 10.1.7.4 [dcl.spec.auto] paragraph 7. --- src/declarations.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarations.tex b/src/declarations.tex index c15e532..3557d66 100644 --- a/src/declarations.tex +++ b/src/declarations.tex @@ -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} } From c3c363d5f45bf7e277b610d6b4e7da5338e0b258 Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Sat, 24 Jun 2017 05:40:33 -0400 Subject: [PATCH 04/13] Removed a duplicated sentence fragment in 10.1.7.4 [dcl.spec.auto] paragraph 9. "is determined is determined" --- src/declarations.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarations.tex b/src/declarations.tex index 3557d66..60131e2 100644 --- a/src/declarations.tex +++ b/src/declarations.tex @@ -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} From 982056c3cda2078ea6f8565b9ad4a103f418941d Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Sat, 24 Jun 2017 05:43:02 -0400 Subject: [PATCH 05/13] Extended a \removed annotation to include text intended to be deleted in 10.1.7.4.1 [dcl.spec.auto.deduct] paragraph 2. Previously, the "a " in "a placeholder type" replaced by "placeholders" was not marked as removed. --- src/declarations.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarations.tex b/src/declarations.tex index 60131e2..8bc3764 100644 --- a/src/declarations.tex +++ b/src/declarations.tex @@ -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: From 266694a0129f81512f9b4ccf40b619900ebccb3d Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Sat, 24 Jun 2017 05:46:26 -0400 Subject: [PATCH 06/13] Removed an extraneous "Otherwise" in 10.1.7.4.1 [dcl.spec.auto.deduct] paragraph 3. The "Otherwise" previously present in this text was left over from prior edits. --- src/declarations.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarations.tex b/src/declarations.tex index 8bc3764..686ff83 100644 --- a/src/declarations.tex +++ b/src/declarations.tex @@ -574,7 +574,7 @@ \tcode{std::initializer_list}.} % \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 From d0def0522b374b0c9c32a194e1eba3e25073bb65 Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Sat, 24 Jun 2017 05:50:55 -0400 Subject: [PATCH 07/13] Corrected 10.1.7.4.1 [dcl.spec.auto.deduct] changes previously attributed to paragraph 3 to apply to paragraph 4. The current WP now has this text as paragraph 4. --- src/declarations.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/src/declarations.tex b/src/declarations.tex index 686ff83..80df31d 100644 --- a/src/declarations.tex +++ b/src/declarations.tex @@ -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 From c0a2e6d8cf2ada84a05b56afef38faf718b3335c Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Sat, 24 Jun 2017 05:58:54 -0400 Subject: [PATCH 08/13] Added grammarterm markup for several mentions of copy-list-initialization in 10.1.7.4.1 [dcl.spec.auto.deduct] paragraph 4. --- src/declarations.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarations.tex b/src/declarations.tex index 80df31d..26aafb0 100644 --- a/src/declarations.tex +++ b/src/declarations.tex @@ -571,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}.} % \begin{addedblock} 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} From 3c95aeb4792f2543e1a461262f279009d0066a6e Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Sat, 24 Jun 2017 06:01:25 -0400 Subject: [PATCH 09/13] Added a missing " a " in 10.1.7.4.1 [dcl.spec.auto.deduct][dcl.spec.auto.deduct] paragraph 4.3. --- src/declarations.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarations.tex b/src/declarations.tex index 26aafb0..86aa1a0 100644 --- a/src/declarations.tex +++ b/src/declarations.tex @@ -606,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}; From 1ef720c9a716606a22aa0f5714569275f8f7f83b Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Sat, 24 Jun 2017 06:04:14 -0400 Subject: [PATCH 10/13] Added a missing, but mentioned, parameter name in an example added to 10.1.7.4.1 [dcl.spec.auto.deduct] paragraph 4. --- src/declarations.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarations.tex b/src/declarations.tex index 86aa1a0..938e759 100644 --- a/src/declarations.tex +++ b/src/declarations.tex @@ -714,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 void f2(Pair); +template void f2(Pair p2); \end{codeblock} Both \grammarterm{constrained-type-specifier}{}s in the return type of \tcode{cf} correspond to the same invented template parameter. From 43a89df052a630603a9c4eb9af0a12a1e03da4ed Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Sat, 24 Jun 2017 06:07:24 -0400 Subject: [PATCH 11/13] Removed an extraneous class template declaration in an example added in 10.1.7.4.2 [dcl.spec.auto.constr] paragraph 1. --- src/declarations.tex | 1 - 1 file changed, 1 deletion(-) diff --git a/src/declarations.tex b/src/declarations.tex index 938e759..f8e1e50 100644 --- a/src/declarations.tex +++ b/src/declarations.tex @@ -763,7 +763,6 @@ template class Array { }; template class A> class Stack { }; -template class Alloc { }; void f1(C1); // \tcode{C1} designates a placeholder type void f2(Array); // \tcode{C2} designates a placeholder for an integer value From 59d51ff4ad6b9392143a6404bfce7dde4e834926 Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Sat, 24 Jun 2017 06:14:22 -0400 Subject: [PATCH 12/13] Added a missing " of " in 17.10.4 [temp.constr.resolve] paragraph 2. --- src/constraints.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constraints.tex b/src/constraints.tex index 0de294f..91f5173 100644 --- a/src/constraints.tex +++ b/src/constraints.tex @@ -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 From b36f39e70ca737f719229dae084968de478a74b4 Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Sat, 24 Jun 2017 06:16:17 -0400 Subject: [PATCH 13/13] Removed a duplicated sentence fragment in 17.10.4 [temp.constr.resolve] paragraph 4.3. --- src/constraints.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constraints.tex b/src/constraints.tex index 91f5173..4900dd1 100644 --- a/src/constraints.tex +++ b/src/constraints.tex @@ -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} %