Skip to content

Commit abe208c

Browse files
author
Stefanus Du Toit
committed
Various bug fixes to application of wording.
N3624 - format U1 and U2 with code font N3638 - add missing \pnum N3649 - decl-specifierss -> decl-specifiers N3652 - strike "of literal type" as directed by N3652. Bugfix - remove spurious line break in [basic.start.init]/2. Bugfix - remove excess whitespace in [expr.prim.lambda] Bug fix - [expr.prim.lambda] format operator()(a) in code font. Bug fix - in [expr.const] format constexpr in comment as code. N3638 - remove spurious comma. [temp.explicit] add missing comma. N3652 - fix section names for C++11 compatibility sections. N3638 - add missing paragraph
1 parent 4817e3f commit abe208c

5 files changed

Lines changed: 18 additions & 12 deletions

File tree

source/basic.tex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2510,7 +2510,6 @@
25102510
constant expression, except that it may also invoke \tcode{constexpr} constructors
25112511
for \tcode{o} and its subobjects even if those objects are of non-literal class
25122512
types \enternote such a class may have a non-trivial destructor \exitnote.
2513-
25142513
\indextext{initialization!constant}%
25152514
\term{Constant initialization} is performed:
25162515

source/compatibility.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -800,15 +800,15 @@
800800
Programs and headers that reference \mname{STDC} are
801801
quite common.
802802

803-
\rSec1[diff.cpp03]{\Cpp and ISO \CppIII}
803+
\rSec1[diff.cpp11]{\Cpp and ISO \CppIII}
804804

805805
\pnum
806806
\indextext{summary!compatibility~with ISO \CppIII}%
807807
This subclause lists the differences between \Cpp and
808808
ISO \CppIII (ISO/IEC 14882:2003, \doccite{Programming Languages --- \Cpp}),
809809
by the chapters of this document.
810810

811-
\rSec2[diff.cpp03.lex]{Clause \ref{lex}: lexical conventions}
811+
\rSec2[diff.cpp11.lex]{Clause \ref{lex}: lexical conventions}
812812

813813
\ref{lex.pptoken}
814814
\change New kinds of string literals

source/declarations.tex

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,7 @@
15111511

15121512
\pnum
15131513
If the \tcode{auto} \grammarterm{type-specifier} appears as one of the
1514-
\grammarterm{decl-specifiers}{s} in the \grammarterm{decl-specifier-seq} of a
1514+
\grammarterm{decl-specifier}{s} in the \grammarterm{decl-specifier-seq} of a
15151515
\grammarterm{parameter-declaration} of a \grammarterm{lambda-expression}, the
15161516
\indextext{generic lambda!definition of}%
15171517
lambda is a \term{generic lambda}~(\ref{expr.prim.lambda}). \enterexample
@@ -1647,6 +1647,12 @@
16471647
\exitexample%
16481648
\indextext{specifier|)}
16491649

1650+
\pnum
1651+
If a function with a declared return type that contains a placeholder type has
1652+
multiple \tcode{return} statements, the return type is deduced for each
1653+
\tcode{return} statement. If the type deduced is not the same in each
1654+
deduction, the program is ill-formed.
1655+
16501656
\pnum
16511657
If a function with a declared return type that uses a placeholder type has no
16521658
\tcode{return} statements, the return type is deduced as though from a
@@ -1685,7 +1691,7 @@
16851691
body contains a \tcode{return} statement with a non-type-dependent operand.
16861692
\enternote Therefore, any use of a specialization of the function template will
16871693
cause an implicit instantiation. Any errors that arise from this instantiation
1688-
are not in the immediate context of the function type, and can result in the
1694+
are not in the immediate context of the function type and can result in the
16891695
program being ill-formed. \exitnote
16901696
\enterexample
16911697
\begin{codeblock}
@@ -1697,6 +1703,7 @@
16971703
\end{codeblock}
16981704
\exitexample
16991705

1706+
\pnum
17001707
Redeclarations or specializations of a function or function template with a
17011708
declared return type that uses a placeholder type shall also use that
17021709
placeholder, not a deduced type.

source/expressions.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@
283283
respectively;
284284

285285
\item
286-
if \tcode{T1} is ``pointer to member of \tcode{C1} of type \cvqual{cv1} U1'' and \tcode{T2} is
287-
``pointer to member of \tcode{C2} of type \cvqual{cv2} U2'' where \tcode{C1} is
286+
if \tcode{T1} is ``pointer to member of \tcode{C1} of type \cvqual{cv1} \tcode{U1}'' and \tcode{T2} is
287+
``pointer to member of \tcode{C2} of type \cvqual{cv2} \tcode{U2}'' where \tcode{C1} is
288288
reference-related to \tcode{C2} or \tcode{C2} is reference-related to
289289
\tcode{C1}~(\ref{dcl.init.ref}), the cv-combined type of \tcode{T2} and \tcode{T1} or the cv-combined type
290290
of \tcode{T1} and \tcode{T2}, respectively;
@@ -699,7 +699,7 @@
699699
invented \grammarterm{template-parameter}.
700700
\enterexample
701701
\begin{codeblock}
702-
auto glambda = [](auto a, auto&& b) { return a < b; };
702+
auto glambda = [](auto a, auto&& b) { return a < b; };
703703
bool b = glambda(3, 3.14); // OK
704704
auto vglambda = [](auto printer) {
705705
return [=](auto&& ... ts) { // OK: \tcode{ts} is a function parameter pack
@@ -760,7 +760,7 @@
760760
struct Closure {
761761
template<class T> auto operator()(T t) const { ... }
762762
template<class T> static auto lambda_call_operator_invoker(T a) {
763-
// forwards execution to operator()(a) and therefore has
763+
// forwards execution to \tcode{operator()(a)} and therefore has
764764
// the same return type deduced
765765
...
766766
}
@@ -4484,7 +4484,7 @@
44844484
objects. \exitnote, or
44854485

44864486
\item
4487-
a non-volatile glvalue of literal type that refers to a non-volatile object
4487+
a non-volatile glvalue that refers to a non-volatile object
44884488
defined with \tcode{constexpr}, or that refers to a non-mutable sub-object
44894489
of such an object, or
44904490

@@ -4570,7 +4570,7 @@
45704570
}
45714571
constexpr int f2(int k) {
45724572
int x = k; // OK: not required to be a constant expression
4573-
// because \tcode{x} is not constexpr
4573+
// because \tcode{x} is not \tcode{constexpr}
45744574
return x;
45754575
}
45764576

source/templates.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4662,7 +4662,7 @@
46624662

46634663
\pnum
46644664
\indextext{instantiation!explicit}%
4665-
A class, function, variable or member template specialization can be explicitly
4665+
A class, function, variable, or member template specialization can be explicitly
46664666
instantiated from its template.
46674667
A member function, member class or static data member of a class template can
46684668
be explicitly instantiated from the member definition associated with its class

0 commit comments

Comments
 (0)