Skip to content

Commit bbcd6bb

Browse files
committed
[everywhere] Number notes and examples, make them one point smaller, and
move them to (un-numbered) paragraphs of their own. Partially addresses ISO/CS 016 (C++20 DIS).
1 parent 11f83db commit bbcd6bb

File tree

13 files changed

+51
-36
lines changed

13 files changed

+51
-36
lines changed

source/algorithms.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4390,7 +4390,7 @@
43904390
\begin{note}
43914391
For the overload with an \tcode{ExecutionPolicy},
43924392
there may be a performance cost
4393-
if \tcode{iterator_traits<ForwardIterator1>::value_type}
4393+
if \tcode{iterator_traits<For\-ward\-It\-er\-ator1>::value_type}
43944394
is not \oldconcept{\-Move\-Constructible} (\tref{cpp17.moveconstructible}).
43954395
\end{note}
43964396

@@ -9726,7 +9726,7 @@
97269726
\pnum
97279727
\begin{note}
97289728
The difference between \tcode{transform_exclusive_scan} and
9729-
\tcode{transform_inclusive_scan} is that \tcode{transform_exclusive_scan}
9729+
\tcode{transform_inclusive_scan} is that \tcode{trans\-form\-_\-exclusive_scan}
97309730
excludes the $i^\text{th}$ input element from the $i^\text{th}$ sum.
97319731
If \tcode{binary_op} is not mathematically associative,
97329732
the behavior of \tcode{transform_exclusive_scan} may be nondeterministic.
@@ -9830,7 +9830,7 @@
98309830
\pnum
98319831
\begin{note}
98329832
The difference between \tcode{transform_exclusive_scan} and
9833-
\tcode{transform_inclusive_scan} is that \tcode{transform_inclusive_scan}
9833+
\tcode{transform_inclusive_scan} is that \tcode{trans\-form\-_\-inclusive_scan}
98349834
includes the $i^\text{th}$ input element in the $i^\text{th}$ sum.
98359835
If \tcode{binary_op} is not mathematically associative,
98369836
the behavior of \tcode{transform_inclusive_scan} may be nondeterministic.

source/containers.tex

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,13 @@
336336
or until the allocator is replaced. The allocator may be replaced only via assignment or
337337
\tcode{swap()}. Allocator replacement is performed by
338338
copy assignment, move assignment, or swapping of the allocator only if
339-
\tcode{allocator_traits<allocator_type>::propagate_on_container_copy_assignment::value},
340-
\tcode{allocator_traits<allocator_type>::propagate_on_container_move_assignment::value},
341-
or \tcode{alloca\-tor_traits<allocator_type>::propagate_on_container_swap::value} is \tcode{true}
339+
\begin{itemize}
340+
\item \tcode{allocator_traits<allocator_type>::propagate_on_container_copy_assignment::value},
341+
\item \tcode{allocator_traits<allocator_type>::propagate_on_container_move_assignment::value},
342+
or
343+
\item \tcode{allocator_traits<allocator_type>::propagate_on_container_swap::value}
344+
\end{itemize}
345+
is \tcode{true}
342346
within the implementation of the corresponding container operation.
343347
In all container types defined in this Clause, the member \tcode{get_allocator()}
344348
returns a copy of the allocator used to construct the container or, if that allocator

source/expressions.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4551,7 +4551,7 @@
45514551
fundamental types
45524552
other than \tcode{char}, \tcode{signed char}, and \tcode{unsigned char}}.
45534553
\begin{note}
4554-
In particular, \tcode{sizeof(bool)}, \tcode{sizeof(char16_t)},
4554+
In particular, the values of \tcode{sizeof(bool)}, \tcode{sizeof(char16_t)},
45554555
\tcode{sizeof(char32_t)}, and \tcode{sizeof(wchar_t)} are
45564556
implementation-defined.\footnote{\tcode{sizeof(bool)} is not required to be \tcode{1}.}
45574557
\end{note}

source/future.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2665,9 +2665,9 @@
26652665
\begin{note}
26662666
The example above is representative of
26672667
a historical use of \tcode{filesystem::u8path}.
2668-
Passing a \tcode{std::u8string} to \tcode{path}'s constructor is preferred
2669-
for an indication of UTF-8 encoding more consistent with
2670-
\tcode{path}'s handling of other encodings.
2668+
To indicate a UTF-8 encoding,
2669+
passing a \tcode{std::u8string} to \tcode{path}'s constructor is preferred
2670+
as it is consistent with \tcode{path}'s handling of other encodings.
26712671
\end{note}
26722672
\end{itemdescr}
26732673

source/intro.tex

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -913,13 +913,6 @@
913913
published description, and explains in detail the differences between
914914
\Cpp{} and C\@. Certain features of \Cpp{} exist solely for compatibility
915915
purposes; \ref{depr} describes those features.
916-
917-
\pnum
918-
Throughout this document, each example is introduced by
919-
``\noteintro{Example}'' and terminated by ``\noteoutro{example}''. Each note is
920-
introduced by ``\noteintro{Note}'' or ``\noteintro{Note $n$ to entry}'' and
921-
terminated by ``\noteoutro{note}''. Examples
922-
and notes may be nested.%
923916
\indextext{standard!structure of|)}
924917

925918
\rSec1[syntax]{Syntax notation}

source/iostreams.tex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14883,8 +14883,9 @@
1488314883

1488414884
\pnum
1488514885
\begin{note}
14886-
To iterate over the current directory, use \tcode{recursive_directory_iterator(".")}
14887-
rather than \tcode{recursive_directory_iterator("")}.
14886+
Use \tcode{recursive_directory_iterator(".")}
14887+
rather than \tcode{recursive_directory_iterator("")}
14888+
to iterate over the current directory.
1488814889
\end{note}
1488914890

1489014891
\pnum

source/layout.tex

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,13 @@
6565
}}}
6666
\makeatother
6767

68-
\def\pnum
69-
{\parabullnum{Paras}{0pt}}
68+
% Register our intent to number the next paragraph. Don't actually number it
69+
% yet, because we might have a paragraph break before we see its contents (for
70+
% example, if the paragraph begins with a note or example).
71+
\def\pnum{%
72+
\global\def\maybeaddpnum{\global\def\maybeaddpnum{}\parabullnum{Paras}{0pt}}%
73+
\everypar=\expandafter{\the\everypar\maybeaddpnum}%
74+
}
7075

7176
% Leave more room for section numbers in TOC
7277
\cftsetindents{section}{1.5em}{3.0em}

source/locales.tex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,9 @@
228228
\begin{itemize}
229229
\item
230230
A member operator template
231-
\tcode{operator()(const basic_string<C, T, A>\&, const basic_string<\brk{}C, T, A>\&)}
231+
\begin{codeblock}
232+
operator()(const basic_string<C, T, A>&, const basic_string<C, T, A>&)
233+
\end{codeblock}
232234
is provided so that a locale may be used as a predicate argument to
233235
the standard collections, to collate strings.
234236
\item

source/macros.tex

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@
9191
\or\let\s=\paragraph\let\l=\label
9292
\or\let\s=\subparagraph\let\l=\label
9393
\fi%
94-
\s[#3]{#3\hfill[#2]}\l{#2}\addxref{#2}}
94+
\s[#3]{#3\hfill[#2]}\l{#2}\addxref{#2}%
95+
\setcounter{note}{0}\setcounter{example}{0}}
9596

9697
% A convenience feature (mostly for the convenience of the Project
9798
% Editor, to make it easy to move around large blocks of text):
@@ -266,10 +267,16 @@
266267
\newcommand{\leftshift}[1]{\ensuremath{\mathbin{\mathsf{lshift}_{#1}}}}
267268

268269
%% Notes and examples
270+
\newcounter{note}
271+
\newcounter{example}
269272
\newcommand{\noteintro}[1]{[\textit{#1}:\space}
270273
\newcommand{\noteoutro}[1]{\textit{\,---\,end #1}\kern.5pt]}
271-
\newenvironment{note}[1][Note]{\noteintro{#1}}{\noteoutro{note}\space}
272-
\newenvironment{example}[1][Example]{\noteintro{#1}}{\noteoutro{example}\space}
274+
\newenvironment{note}[1][Note]
275+
{\par\small\addtocounter{note}{1}\noteintro{#1 \thenote}}
276+
{\noteoutro{note}\par}
277+
\newenvironment{example}[1][Example]
278+
{\par\small\addtocounter{example}{1}\noteintro{#1 \theexample}}
279+
{\noteoutro{example}\par}
273280

274281
%% Library function descriptions
275282
\newcommand{\Fundescx}[1]{\textit{#1}}
@@ -635,4 +642,6 @@
635642
\let\addcontentsline\oldcontentsline%
636643
}
637644
\newcommand{\defncontext}[1]{\textlangle#1\textrangle}
638-
\newenvironment{defnote}{\addtocounter{termnote}{1}\noteintro{Note \thetermnote{} to entry}}{\noteoutro{note}\space}
645+
\newenvironment{defnote}
646+
{\small\addtocounter{termnote}{1}\noteintro{Note \thetermnote{} to entry}}
647+
{\noteoutro{note}\space}

source/ranges.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@
516516
\pnum
517517
\begin{note}
518518
Whenever \tcode{ranges::cend(E)} is a valid expression,
519-
the types \tcode{S} and \tcode{I} of
519+
the types \tcode{S} and \tcode{I} of the expressions
520520
\tcode{ranges::cend(E)} and \tcode{ranges::cbegin(E)}
521521
model \tcode{\libconcept{sentinel_for}<S, I>}.
522522
\end{note}
@@ -652,7 +652,7 @@
652652
\pnum
653653
\begin{note}
654654
Whenever \tcode{ranges::rend(E)} is a valid expression,
655-
the types \tcode{S} and \tcode{I} of
655+
the types \tcode{S} and \tcode{I} of the expressions
656656
\tcode{ranges::rend(E)} and \tcode{ranges::rbegin(E)}
657657
model \tcode{\libconcept{sentinel_for}<S, I>}.
658658
\end{note}
@@ -690,7 +690,7 @@
690690
\pnum
691691
\begin{note}
692692
Whenever \tcode{ranges::crend(E)} is a valid expression,
693-
the types \tcode{S} and \tcode{I} of
693+
the types \tcode{S} and \tcode{I} of the expressions
694694
\tcode{ranges::crend(E)} and \tcode{ranges::crbegin(E)}
695695
model \tcode{\libconcept{sentinel_for}<S, I>}.
696696
\end{note}

0 commit comments

Comments
 (0)