Skip to content

Commit ffc9ad3

Browse files
authored
Merge branch 'master' into b19
2 parents 1910cc7 + bd2ce5c commit ffc9ad3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3799
-2349
lines changed

README.rst

+9
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ Install the following packages:
4242

4343
dnf install texlive texlive-isodate texlive-relsize texlive-ulem texlive-fixme texlive-extract
4444

45+
-----------------------------
46+
Getting Started on Arch Linux
47+
-----------------------------
48+
49+
Install the following packages:
50+
51+
latex-mk from the Arch User Repository.
52+
pacman -S texlive-latexextra
53+
4554
------------
4655
Instructions
4756
------------

source/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ reindex:
3838
$(STDPDF)
3939
$(STDPDF)
4040
makeindex generalindex
41+
makeindex headerindex
4142
makeindex libraryindex
4243
makeindex grammarindex
4344
makeindex impldefindex

source/access.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@
195195
(\ref{class.derived}):
196196

197197
\begin{ncbnftab}
198-
access-specifier \terminal{:} member-specification\opt
198+
access-specifier \terminal{:} member-specification\opt{}
199199
\end{ncbnftab}
200200

201201
An

source/algorithms.tex

+601-544
Large diffs are not rendered by default.

source/atomics.tex

+302-125
Large diffs are not rendered by default.

source/back.tex

+11-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ \chapter{Bibliography}
3636

3737
\clearpage
3838
\input{xrefdelta}
39-
\renewcommand{\glossaryname}{Cross references from ISO \CppXVII}
39+
\renewcommand{\glossaryname}{Cross references from ISO \CppXVII{}}
4040
\renewcommand{\preglossaryhook}{All clause and subclause labels from
41-
ISO \CppXVII (ISO/IEC 14882:2017, \doccite{Programming Languages --- \Cpp})
41+
ISO \CppXVII{} (ISO/IEC 14882:2017, \doccite{Programming Languages --- \Cpp{}})
4242
are present in this document, with the exceptions described below.\\}
4343
\renewcommand{\leftmark}{\glossaryname}
4444
{
@@ -64,6 +64,15 @@ \chapter{Bibliography}
6464
\printindex[grammarindex]
6565
}
6666

67+
\clearpage
68+
\renewcommand{\preindexhook}{}
69+
\renewcommand{\indexname}{Index of library headers}
70+
\renewcommand{\leftmark}{\indexname}
71+
{
72+
\raggedright
73+
\printindex[headerindex]
74+
}
75+
6776
\clearpage
6877
\renewcommand{\preindexhook}{}
6978
\renewcommand{\indexname}{Index of library names}

source/basic.tex

+36-36
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
\gramSec[gram.basic]{Basic concepts}
55

66
\pnum
7-
\begin{note} This Clause presents the basic concepts of the \Cpp language.
7+
\begin{note} This Clause presents the basic concepts of the \Cpp{} language.
88
It explains the difference between an object and a
99
name and how they relate to the value categories for expressions.
1010
It introduces the concepts of a
11-
declaration and a definition and presents \Cpp's
11+
declaration and a definition and presents \Cpp{}'s
1212
notion of type, scope, linkage, and
1313
storage duration. The mechanisms for starting and
1414
terminating a program are discussed. Finally, this Clause presents the
@@ -215,7 +215,7 @@
215215
\pnum
216216
\begin{note}
217217
\indextext{implementation-generated}%
218-
In some circumstances, \Cpp implementations implicitly define the
218+
In some circumstances, \Cpp{} implementations implicitly define the
219219
default constructor\iref{class.ctor},
220220
copy constructor\iref{class.copy},
221221
move constructor\iref{class.copy},
@@ -776,7 +776,7 @@
776776
\item for a declaration of the form
777777

778778
\begin{ncbnf}
779-
class-key attribute-specifier-seq\opt identifier \terminal{;}
779+
class-key attribute-specifier-seq\opt{} identifier \terminal{;}
780780
\end{ncbnf}
781781

782782
the \grammarterm{identifier} is declared to be a
@@ -1775,7 +1775,7 @@
17751775
\grammarterm{qualified-id} of the form:
17761776

17771777
\begin{ncbnf}
1778-
nested-name-specifier\opt class-name \terminal{::} \terminal{\tilde} class-name
1778+
nested-name-specifier\opt{} class-name \terminal{::} \terminal{\~} class-name
17791779
\end{ncbnf}
17801780

17811781
the second \grammarterm{class-name} is looked up in the same scope as the
@@ -2135,7 +2135,7 @@
21352135
following form:
21362136

21372137
\begin{ncbnf}
2138-
class-key attribute-specifier-seq\opt identifier \terminal{;}
2138+
class-key attribute-specifier-seq\opt{} identifier \terminal{;}
21392139
\end{ncbnf}
21402140

21412141
the \grammarterm{identifier} is looked up according
@@ -2150,7 +2150,7 @@
21502150
form:
21512151

21522152
\begin{ncbnf}
2153-
class-key attribute-specifier-seq\opt identifier \terminal{;}
2153+
class-key attribute-specifier-seq\opt{} identifier \terminal{;}
21542154
\end{ncbnf}
21552155

21562156
the \grammarterm{elaborated-type-specifier} is a declaration that
@@ -2316,7 +2316,7 @@
23162316

23172317
\begin{bnf}
23182318
\nontermdef{translation-unit}\br
2319-
declaration-seq\opt
2319+
declaration-seq\opt{}
23202320
\end{bnf}
23212321

23222322
\pnum
@@ -2540,7 +2540,7 @@
25402540
identity does not require a diagnostic.
25412541

25422542
\pnum
2543-
\begin{note} Linkage to non-\Cpp declarations can be achieved using a
2543+
\begin{note} Linkage to non-\Cpp{} declarations can be achieved using a
25442544
\grammarterm{linkage-specification}\iref{dcl.link}. \end{note}%
25452545
\indextext{linkage|)}
25462546

@@ -2550,7 +2550,7 @@
25502550

25512551
\pnum
25522552
\indextext{memory model|(}%
2553-
The fundamental storage unit in the \Cpp memory model is the
2553+
The fundamental storage unit in the \Cpp{} memory model is the
25542554
\defn{byte}.
25552555
A byte is at least large enough to contain any member of the basic
25562556
\indextext{character set!basic execution}%
@@ -2562,7 +2562,7 @@
25622562
the number of which is \impldef{bits in a byte}. The least
25632563
significant bit is called the \defn{low-order bit}; the most
25642564
significant bit is called the \defn{high-order bit}. The memory
2565-
available to a \Cpp program consists of one or more sequences of
2565+
available to a \Cpp{} program consists of one or more sequences of
25662566
contiguous bytes. Every byte has a unique address.
25672567

25682568
\pnum
@@ -2614,7 +2614,7 @@
26142614

26152615
\pnum
26162616
\indextext{object model|(}%
2617-
The constructs in a \Cpp program create, destroy, refer to, access, and
2617+
The constructs in a \Cpp{} program create, destroy, refer to, access, and
26182618
manipulate objects.
26192619
An \defn{object} is created
26202620
by a definition\iref{basic.def},
@@ -2800,7 +2800,7 @@
28002800

28012801
\pnum
28022802
\begin{note}
2803-
\Cpp provides a variety of fundamental types and several ways of composing
2803+
\Cpp{} provides a variety of fundamental types and several ways of composing
28042804
new types from existing types\iref{basic.types}.
28052805
\end{note}%
28062806
\indextext{object model|)}
@@ -2877,7 +2877,7 @@
28772877
For an object under construction or destruction, see~\ref{class.cdtor}.
28782878
Otherwise, such
28792879
a pointer refers to allocated
2880-
storage\iref{basic.stc.dynamic.deallocation}, and using the pointer as
2880+
storage\iref{basic.stc.dynamic.allocation}, and using the pointer as
28812881
if the pointer were of type \tcode{void*}, is
28822882
well-defined. Indirection through such a pointer is permitted but the resulting lvalue may only be used in
28832883
limited ways, as described below. The
@@ -2943,7 +2943,7 @@
29432943
For an object under construction or destruction, see~\ref{class.cdtor}.
29442944
Otherwise, such
29452945
a glvalue refers to
2946-
allocated storage\iref{basic.stc.dynamic.deallocation}, and using the
2946+
allocated storage\iref{basic.stc.dynamic.allocation}, and using the
29472947
properties of the glvalue that do not depend on its value is
29482948
well-defined. The program has undefined behavior if:
29492949
\begin{itemize}
@@ -3181,7 +3181,7 @@
31813181
\indextext{\idxcode{new}}%
31823182
\grammarterm{new-expression}{s}\iref{expr.new}, and destroyed using
31833183
\indextext{\idxcode{delete}}%
3184-
\grammarterm{delete-expression}{s}\iref{expr.delete}. A \Cpp implementation
3184+
\grammarterm{delete-expression}{s}\iref{expr.delete}. A \Cpp{} implementation
31853185
provides access to, and management of, dynamic storage via the global
31863186
\defn{allocation functions} \tcode{operator new} and \tcode{operator
31873187
new[]} and the global \defn{deallocation functions} \tcode{operator
@@ -3194,7 +3194,7 @@
31943194
\pnum
31953195
The library provides default definitions for the global allocation and
31963196
deallocation functions. Some global allocation and deallocation
3197-
functions are replaceable\iref{new.delete}. A \Cpp program shall
3197+
functions are replaceable\iref{new.delete}. A \Cpp{} program shall
31983198
provide at most one definition of a replaceable allocation or
31993199
deallocation function. Any such function definition replaces the default
32003200
version provided in the library\iref{replacement.functions}. The
@@ -3203,16 +3203,16 @@
32033203
program.
32043204

32053205
\begin{codeblock}
3206-
void* operator new(std::size_t);
3207-
void* operator new(std::size_t, std::align_val_t);
3206+
[[nodiscard]] void* operator new(std::size_t);
3207+
[[nodiscard]] void* operator new(std::size_t, std::align_val_t);
32083208

32093209
void operator delete(void*) noexcept;
32103210
void operator delete(void*, std::size_t) noexcept;
32113211
void operator delete(void*, std::align_val_t) noexcept;
32123212
void operator delete(void*, std::size_t, std::align_val_t) noexcept;
32133213

3214-
void* operator new[](std::size_t);
3215-
void* operator new[](std::size_t, std::align_val_t);
3214+
[[nodiscard]] void* operator new[](std::size_t);
3215+
[[nodiscard]] void* operator new[](std::size_t, std::align_val_t);
32163216

32173217
void operator delete[](void*) noexcept;
32183218
void operator delete[](void*, std::size_t) noexcept;
@@ -3240,7 +3240,7 @@
32403240
class\iref{class.free}.
32413241

32423242
\pnum
3243-
Any allocation and/or deallocation functions defined in a \Cpp program,
3243+
Any allocation and/or deallocation functions defined in a \Cpp{} program,
32443244
including the default versions in the library, shall conform to the
32453245
semantics specified in~\ref{basic.stc.dynamic.allocation}
32463246
and~\ref{basic.stc.dynamic.deallocation}.
@@ -3288,7 +3288,7 @@
32883288
returned as a request for zero size is undefined.\footnote{The intent is
32893289
to have \tcode{operator new()} implementable by
32903290
calling \tcode{std::malloc()} or \tcode{std::calloc()}, so the rules are
3291-
substantially the same. \Cpp differs from C in requiring a zero request
3291+
substantially the same. \Cpp{} differs from C in requiring a zero request
32923292
to return a non-null pointer.}
32933293

32943294
\pnum
@@ -3311,7 +3311,7 @@
33113311
A global allocation function is only called as the result of a new
33123312
expression\iref{expr.new}, or called directly using the function call
33133313
syntax\iref{expr.call}, or called indirectly through calls to the
3314-
functions in the \Cpp standard library. \begin{note} In particular, a
3314+
functions in the \Cpp{} standard library. \begin{note} In particular, a
33153315
global allocation function is not called to allocate storage for objects
33163316
with static storage duration\iref{basic.stc.static}, for objects or references
33173317
with thread storage duration\iref{basic.stc.thread}, for objects of
@@ -3394,12 +3394,12 @@
33943394
A pointer value is a \defn{safely-derived pointer} to a dynamic object only if it
33953395
has an object pointer type and it is one of the following:
33963396
\begin{itemize}
3397-
\item the value returned by a call to the \Cpp standard library implementation of
3397+
\item the value returned by a call to the \Cpp{} standard library implementation of
33983398
\tcode{::operator new(std::\brk{}size_t)} or
33993399
\tcode{::operator new(std::size_t, std::align_val_t)}%
34003400
;\footnote{This subclause does not impose restrictions
34013401
on indirection through pointers to memory not allocated by \tcode{::operator new}. This
3402-
maintains the ability of many \Cpp implementations to use binary libraries and
3402+
maintains the ability of many \Cpp{} implementations to use binary libraries and
34033403
components written in other languages. In particular, this applies to C binaries,
34043404
because indirection through pointers to memory allocated by \tcode{std::malloc} is not restricted.}
34053405

@@ -3636,7 +3636,7 @@
36363636
a set of bits in the object representation that determines a
36373637
\defn{value}, which is one discrete element of an
36383638
\impldef{values of a trivially copyable type} set of values.\footnote{The
3639-
intent is that the memory model of \Cpp is compatible
3639+
intent is that the memory model of \Cpp{} is compatible
36403640
with that of ISO/IEC 9899 Programming Language C.}
36413641

36423642
\pnum
@@ -3751,7 +3751,7 @@
37513751
within a constant expression.
37523752
It is not a guarantee that it is possible to create such an object,
37533753
nor is it a guarantee that any object of that type
3754-
will usable in a constant expression.
3754+
will be usable in a constant expression.
37553755
\end{note}
37563756

37573757
\pnum
@@ -4556,7 +4556,7 @@
45564556
If \placeholder{A} and \placeholder{B} would not otherwise be sequenced then they are
45574557
indeterminately sequenced.
45584558
\end{note}
4559-
Several contexts in \Cpp cause evaluation of a function call, even
4559+
Several contexts in \Cpp{} cause evaluation of a function call, even
45604560
though no corresponding function call syntax appears in the translation
45614561
unit.
45624562
\begin{example}
@@ -4596,7 +4596,7 @@
45964596
with automatic or thread storage duration\iref{basic.stc} is associated with
45974597
one specific thread, and can be accessed by a different thread only indirectly
45984598
through a pointer or reference\iref{basic.compound}.} Under a hosted
4599-
implementation, a \Cpp program can have more than one thread running
4599+
implementation, a \Cpp{} program can have more than one thread running
46004600
concurrently. The execution of each thread proceeds as defined by the remainder
46014601
of this document. The execution of the entire program consists of an execution
46024602
of all of its threads. \begin{note} Usually the execution can be viewed as an
@@ -4878,7 +4878,7 @@
48784878
\begin{note} The four preceding coherence requirements effectively disallow
48794879
compiler reordering of atomic operations to a single object, even if both
48804880
operations are relaxed loads. This effectively makes the cache coherence
4881-
guarantee provided by most hardware available to \Cpp atomic operations.
4881+
guarantee provided by most hardware available to \Cpp{} atomic operations.
48824882
\end{note}
48834883

48844884
\pnum
@@ -4902,7 +4902,7 @@
49024902
except for the special case for signal handlers described below.
49034903
Any such data race results in undefined
49044904
behavior. \begin{note} It can be shown that programs that correctly use mutexes
4905-
and \tcode{memory_order_seq_cst} operations to prevent all data races and use no
4905+
and \tcode{memory_order::seq_cst} operations to prevent all data races and use no
49064906
other synchronization operations behave as if the operations executed by their
49074907
constituent threads were simply interleaved, with each
49084908
\indextext{value computation}%
@@ -4942,7 +4942,7 @@
49424942

49434943
\pnum
49444944
\begin{note} Transformations that introduce a speculative read of a potentially
4945-
shared memory location may not preserve the semantics of the \Cpp program as
4945+
shared memory location may not preserve the semantics of the \Cpp{} program as
49464946
defined in this document, since they potentially introduce a data race. However,
49474947
they are typically valid in the context of an optimizing compiler that targets a
49484948
specific machine with well-defined semantics for data races. They would be
@@ -5174,7 +5174,7 @@
51745174

51755175
\pnum
51765176
An implementation shall not predefine the \tcode{main} function. This
5177-
function shall not be overloaded. Its type shall have \Cpp language linkage
5177+
function shall not be overloaded. Its type shall have \Cpp{} language linkage
51785178
and it shall have a declared return type of type
51795179
\tcode{int}, but otherwise its type is \impldef{parameters to \tcode{main}}.
51805180
\indextext{\idxcode{main} function!implementation-defined parameters to}%
@@ -5198,7 +5198,7 @@
51985198
\tcode{argv[0]} through \tcode{argv[argc-1]} as pointers to the initial
51995199
characters of null-terminated multibyte strings (\ntmbs{}s)\iref{multibyte.strings}
52005200
and \tcode{argv[0]} shall be the pointer to
5201-
the initial character of a \ntmbs that represents the name used to
5201+
the initial character of a \ntmbs{} that represents the name used to
52025202
invoke the program or \tcode{""}. The value of \tcode{argc} shall be
52035203
non-negative. The value of \tcode{argv[argc]} shall be 0. \begin{note} It
52045204
is recommended that any further (optional) parameters be added after
@@ -5548,7 +5548,7 @@
55485548
\indexlibrary{\idxcode{abort}}%
55495549
\indextext{termination!program}%
55505550
Calling the function \tcode{std::abort()} declared in
5551-
\indextext{\idxhdr{cstdlib}}%
5551+
\indexhdr{cstdlib}%
55525552
\tcode{<cstdlib>} terminates the program without executing any destructors
55535553
and without calling
55545554
the functions passed to \tcode{std::atexit()} or \tcode{std::at_quick_exit()}.%

0 commit comments

Comments
 (0)