Skip to content

Commit ffe2553

Browse files
jensmaurertkoeppe
authored andcommitted
[lib] Avoid redundant \tcode{\exposid{...}} and add a check
1 parent bf30432 commit ffe2553

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

source/containers.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18389,8 +18389,8 @@
1838918389

1839018390
\pnum
1839118391
\effects
18392-
Initializes \tcode{\exposid{data_}} with \tcode{to_address(first)} and
18393-
\tcode{\exposid{size_}} with \tcode{count}.
18392+
Initializes \exposid{data_} with \tcode{to_address(first)} and
18393+
\exposid{size_} with \tcode{count}.
1839418394

1839518395
\pnum
1839618396
\throws
@@ -18432,8 +18432,8 @@
1843218432

1843318433
\pnum
1843418434
\effects
18435-
Initializes \tcode{\exposid{data_}} with \tcode{to_address(first)} and
18436-
\tcode{\exposid{size_}} with \tcode{last - first}.
18435+
Initializes \exposid{data_} with \tcode{to_address(first)} and
18436+
\exposid{size_} with \tcode{last - first}.
1843718437

1843818438
\pnum
1843918439
\throws
@@ -18510,8 +18510,8 @@
1851018510

1851118511
\pnum
1851218512
\effects
18513-
Initializes \tcode{\exposid{data_}} with \tcode{ranges::data(r)} and
18514-
\tcode{\exposid{size_}} with \tcode{ranges::size(r)}.
18513+
Initializes \exposid{data_} with \tcode{ranges::data(r)} and
18514+
\exposid{size_} with \tcode{ranges::size(r)}.
1851518515

1851618516
\pnum
1851718517
\throws

source/locales.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4855,7 +4855,7 @@
48554855
\begin{itemdescr}
48564856
\pnum
48574857
\returns
4858-
\tcode{\exposid{mib_}}.
4858+
\exposid{mib_}.
48594859
\end{itemdescr}
48604860

48614861
\indexlibrarymember{name}{text_encoding}%
@@ -4866,15 +4866,15 @@
48664866
\begin{itemdescr}
48674867
\pnum
48684868
\returns
4869-
\tcode{\exposid{name_}} if \tcode{(\exposid{name_}[0] != '\textbackslash 0')}
4869+
\exposid{name_} if \tcode{(\exposid{name_}[0] != '\textbackslash 0')}
48704870
is \tcode{true}, and
48714871
\keyword{nullptr} otherwise.
48724872

48734873
\pnum
48744874
\remarks
48754875
If \tcode{name() == nullptr} is \tcode{false},
48764876
\tcode{name()} is an \ntbs{} and
4877-
accessing elements of \tcode{\exposid{name_}}
4877+
accessing elements of \exposid{name_}
48784878
outside of the range \countedrange{name()}{strlen(name()) + 1}
48794879
is undefined behavior.
48804880
\end{itemdescr}

source/ranges.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13529,7 +13529,7 @@
1352913529
using @\exposid{Base}@ = @\exposid{maybe-const}@<Const, V>; // \expos
1353013530
iterator_t<@\exposid{Base}@> @\exposid{current_}@ = iterator_t<@\exposid{Base}@>(); // \expos
1353113531
iterator_t<@\exposid{Base}@> @\exposid{last_ele_}@ = iterator_t<@\exposid{Base}@>(); // \expos,
13532-
// present only if \tcode{\exposid{Base}} models \tcode{\exposconcept{slide-caches-first}}
13532+
// present only if \exposid{Base} models \tcode{\exposconcept{slide-caches-first}}
1353313533
range_difference_t<@\exposid{Base}@> @\exposid{n_}@ = 0; // \expos
1353413534

1353513535
constexpr @\exposid{iterator}@(iterator_t<@\exposid{Base}@> current, range_difference_t<@\exposid{Base}@> n) // \expos

tools/check-source.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ fgrep -n '\^' $texfiles |
8383
grep -n 'U+' $texfiles |
8484
fail 'use \\unicode or \\ucode or \\uname instead' || failed=1
8585

86+
# Discourage double-wrapping \tcode{\exposid{data_}}
87+
grep -n '\\tcode{\\exposid{[a-zA-Z0-9_]*}}' $texfiles |
88+
fail 'double-wrapped \\exposid in \\tcode' || failed=1
89+
8690
# Hex digits inside \ucode and \unicode must be lowercase so that \textsc works
8791
grep -n 'ucode{[^}]*[^0-9a-f}][^}]*}' $texfiles |
8892
fail 'use lowercase hex digits inside \\ucode' || failed=1

0 commit comments

Comments
 (0)