Skip to content

Commit a7282c2

Browse files
authored
[std] Introduce tailnote environment to avoid empty lines in tables. (#4249)
1 parent 2e08786 commit a7282c2

File tree

5 files changed

+24
-20
lines changed

5 files changed

+24
-20
lines changed

source/iostreams.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -13738,11 +13738,11 @@
1373813738
trying to determine the type. \\ \rowsep
1373913739
\tcode{not_found} &
1374013740
Pseudo-type indicating the file was not found.
13741-
\begin{note}
13741+
\begin{tailnote}
1374213742
The file
1374313743
not being found is not considered an error while determining the
1374413744
type of a file.
13745-
\end{note}
13745+
\end{tailnote}
1374613746
\\ \rowsep
1374713747
\tcode{regular} & Regular file \\ \rowsep
1374813748
\tcode{directory} & Directory file \\ \rowsep

source/lib-intro.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -1839,9 +1839,9 @@
18391839
of allocating a single object of type \tcode{T}, even when \tcode{sizeof(T)}
18401840
is small. That is, there is no need for a container to maintain its own
18411841
free list.}
1842-
\begin{note}
1842+
\begin{tailnote}
18431843
If \tcode{n == 0}, the return value is unspecified.
1844-
\end{note}
1844+
\end{tailnote}
18451845
& \\ \rowsep
18461846

18471847
\tcode{a.allocate(n, y)} &

source/macros.tex

+6-2
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,15 @@
274274
% ending with END TEXT. A counter with name ENVIRON indicates the
275275
% number of this kind of note / example that has occurred in this
276276
% subclause.
277+
% Use ENVIRON* to avoid inserting a \par at the end.
277278
\newcommand{\newnoteenvironment}[3]{
278279
\newsubclausecounter{#1}
280+
\newenvironment{tail#1}
281+
{\par\small\stepcounter{#1}\noteintro{#2}}
282+
{\noteoutro{#3}}
279283
\newenvironment{#1}
280-
{\def\noteend{#3}\par\small\stepcounter{#1}\noteintro{#2}}
281-
{\noteoutro{\noteend}\par}
284+
{\begin{tail#1}}
285+
{\end{tail#1}\small\par} % \small\par is for C++20 post-DIS compatibility
282286
}
283287

284288
\newnoteenvironment{note}{Note \arabic{note}}{end note}

source/time.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -11249,13 +11249,13 @@
1124911249
\\ \rowsep
1125011250
\tcode{\%n} &
1125111251
Matches one white space character.
11252-
\begin{note}
11252+
\begin{tailnote}
1125311253
\tcode{\%n}, \tcode{\%t}, and a space
1125411254
can be combined to match a wide range of white-space patterns.
1125511255
For example,
1125611256
\tcode{"\%n "} matches one or more white space characters, and
1125711257
\tcode{"\%n\%t\%t"} matches one to three white space characters.
11258-
\end{note}
11258+
\end{tailnote}
1125911259
\\ \rowsep
1126011260
\tcode{\%p} &
1126111261
The locale's equivalent of the AM/PM designations associated with a 12-hour clock.

source/utilities.tex

+12-12
Original file line numberDiff line numberDiff line change
@@ -16593,10 +16593,10 @@
1659316593
\tcode{struct is_final;} &
1659416594
\tcode{T} is a class type marked with the \grammarterm{class-virt-specifier}
1659516595
\tcode{final}\iref{class.pre}.
16596-
\begin{note}
16596+
\begin{tailnote}
1659716597
A union is a class type that
1659816598
can be marked with \tcode{final}.
16599-
\end{note}
16599+
\end{tailnote}
1660016600
&
1660116601
If \tcode{T} is a class type, \tcode{T} shall be a complete type. \\ \rowsep
1660216602

@@ -16674,13 +16674,13 @@
1667416674
operand\iref{expr.prop}. Access checking is performed as if in a context
1667516675
unrelated to \tcode{T} and \tcode{U}. Only the validity of the immediate context
1667616676
of the assignment expression is considered.
16677-
\begin{note}
16677+
\begin{tailnote}
1667816678
The compilation of the
1667916679
expression can result in side effects such as the instantiation of class template
1668016680
specializations and function template specializations, the generation of
1668116681
implicitly-defined functions, and so on. Such side effects are not in the ``immediate
1668216682
context'' and can result in the program being ill-formed.
16683-
\end{note}
16683+
\end{tailnote}
1668416684
&
1668516685
\tcode{T} and \tcode{U} shall be complete types, \cv{}~\tcode{void},
1668616686
or arrays of unknown bound. \\ \rowsep
@@ -17121,10 +17121,10 @@
1712117121
not possibly cv-qualified versions of the same type,
1712217122
\tcode{Derived} shall be a complete
1712317123
type.
17124-
\begin{note}
17124+
\begin{tailnote}
1712517125
Base classes that are private, protected, or ambiguous
1712617126
are, nonetheless, base classes.
17127-
\end{note}
17127+
\end{tailnote}
1712817128
\\ \rowsep
1712917129

1713017130
\indexlibraryglobal{is_convertible}%
@@ -17447,11 +17447,11 @@
1744717447
If \tcode{T} names a type ``array of \tcode{U}'',
1744817448
the member typedef \tcode{type} shall
1744917449
be \tcode{U}, otherwise \tcode{T}.
17450-
\begin{note}
17450+
\begin{tailnote}
1745117451
For multidimensional arrays, only the first array dimension is
1745217452
removed. For a type ``array of \tcode{const U}'', the resulting type is
1745317453
\tcode{const U}.
17454-
\end{note}
17454+
\end{tailnote}
1745517455
\\ \rowsep
1745617456

1745717457
\indexlibraryglobal{remove_all_extents}%
@@ -19493,11 +19493,11 @@
1949319493
numbers.
1949419494
The \tcode{+} sign is inserted before the output of \tcode{to_chars} for
1949519495
non-negative numbers other than negative zero.
19496-
\begin{note}
19496+
\begin{tailnote}
1949719497
For negative numbers and negative zero
1949819498
the output of \tcode{to_chars} will already contain the sign
1949919499
so no additional transformation is performed.
19500-
\end{note}
19500+
\end{tailnote}
1950119501
\\ \rowsep
1950219502
%
1950319503
\tcode{-} &
@@ -19768,10 +19768,10 @@
1976819768
%
1976919769
none &
1977019770
The same as \tcode{d}.
19771-
\begin{note}
19771+
\begin{tailnote}
1977219772
If the formatting argument type is \tcode{charT} or \tcode{bool},
1977319773
the default is instead \tcode{c} or \tcode{s}, respectively.
19774-
\end{note}
19774+
\end{tailnote}
1977519775
\\
1977619776
\end{floattable}
1977719777

0 commit comments

Comments
 (0)