Skip to content

Commit 91e8500

Browse files
jensmaurertkoeppe
authored andcommitted
[std] Redefine \logop to small caps and fix all uses
1 parent 84786ac commit 91e8500

9 files changed

+22
-18
lines changed

source/basic.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -5964,8 +5964,8 @@
59645964
$B$ is an invocation of any specialization of
59655965
\tcode{std::kill_dependency}\iref{atomics.order}, or
59665966
\item
5967-
$A$ is the left operand of a built-in logical \logop{AND} (\tcode{\&\&},
5968-
see~\ref{expr.log.and}) or logical \logop{OR} (\tcode{||}, see~\ref{expr.log.or})
5967+
$A$ is the left operand of a built-in logical \logop{and} (\tcode{\&\&},
5968+
see~\ref{expr.log.and}) or logical \logop{or} (\tcode{||}, see~\ref{expr.log.or})
59695969
operator, or
59705970
\item
59715971
$A$ is the left operand of a conditional (\tcode{?:}, see~\ref{expr.cond})

source/expressions.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -6705,7 +6705,7 @@
67056705
of the base-2 representation of the result \tcode{r}
67066706
is 1 if both $\tcode{x}_i$ and $\tcode{y}_i$ are 1, and 0 otherwise.
67076707
\begin{note}
6708-
The result is the bitwise \logop{AND} function of the operands.
6708+
The result is the bitwise \logop{and} function of the operands.
67096709
\end{note}
67106710

67116711
\rSec2[expr.xor]{Bitwise exclusive OR operator}%
@@ -6731,7 +6731,7 @@
67316731
is 1 if either (but not both) of $\tcode{x}_i$ and $\tcode{y}_i$ is 1,
67326732
and 0 otherwise.
67336733
\begin{note}
6734-
The result is the bitwise exclusive \logop{OR} function of the operands.
6734+
The result is the bitwise exclusive \logop{or} function of the operands.
67356735
\end{note}
67366736

67376737
\rSec2[expr.or]{Bitwise inclusive OR operator}%
@@ -6756,7 +6756,7 @@
67566756
of the base-2 representation of the result \tcode{r}
67576757
is 1 if at least one of $\tcode{x}_i$ and $\tcode{y}_i$ is 1, and 0 otherwise.
67586758
\begin{note}
6759-
The result is the bitwise inclusive \logop{OR} function of the operands.
6759+
The result is the bitwise inclusive \logop{or} function of the operands.
67606760
\end{note}
67616761

67626762
\rSec2[expr.log.and]{Logical AND operator}%

source/iostreams.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -15365,10 +15365,10 @@
1536515365
\tcode{permissions} shall replace the file's permission bits with \tcode{perm} \\ \rowsep
1536615366
\tcode{add} &
1536715367
\tcode{permissions} shall replace the file's permission bits with
15368-
the bitwise \logop{OR} of \tcode{perm} and the file's current permission bits. \\ \rowsep
15368+
the bitwise \logop{or} of \tcode{perm} and the file's current permission bits. \\ \rowsep
1536915369
\tcode{remove} &
1537015370
\tcode{permissions} shall replace the file's permission bits with
15371-
the bitwise \logop{AND} of the complement of \tcode{perm} and the file's current permission bits. \\ \rowsep
15371+
the bitwise \logop{and} of the complement of \tcode{perm} and the file's current permission bits. \\ \rowsep
1537215372
\tcode{nofollow} &
1537315373
\tcode{permissions} shall change the permissions of a symbolic link itself
1537415374
rather than the permissions of the file the link resolves to. \\

source/macros.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@
518518
\newcommand{\cvqual}[1]{\textit{#1}}
519519
\newcommand{\cv}{\ifmmode\mathit{cv}\else\cvqual{cv}\fi}
520520
\newcommand{\numconst}[1]{\textsl{#1}}
521-
\newcommand{\logop}[1]{{\footnotesize #1}}
521+
\newcommand{\logop}[1]{\textsc{#1}}
522522

523523
%%--------------------------------------------------
524524
%% Environments for code listings.

source/ranges.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -3994,7 +3994,7 @@
39943994
Range adaptors are declared in namespace \tcode{std::ranges::views}.
39953995

39963996
\pnum
3997-
The bitwise \logop{OR} operator is overloaded for the purpose of creating adaptor chain
3997+
The bitwise \logop{or} operator is overloaded for the purpose of creating adaptor chain
39983998
pipelines. The adaptors also support function call syntax with equivalent
39993999
semantics.
40004000

@@ -9863,7 +9863,7 @@
98639863
\pnum
98649864
\remarks
98659865
The exception specification is equivalent to
9866-
the logical \logop{AND} of the following expressions:
9866+
the logical \logop{and} of the following expressions:
98679867
\begin{codeblock}
98689868
noexcept(ranges::iter_swap(std::get<@$i$@>(l.@\exposid{current_}@), std::get<@$i$@>(r.@\exposid{current_}@)))
98699869
\end{codeblock}

source/regex.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
Converts the character sequence designated by the iterator range
265265
\range{F1}{F2} into a value of a bitmask type that can
266266
subsequently be passed to \tcode{isctype}.
267-
Values returned from \tcode{lookup_classname} can be bitwise \logop{OR}'ed together;
267+
Values returned from \tcode{lookup_classname} can be bitwise \logop{or}'ed together;
268268
the resulting value represents membership
269269
in either of the corresponding character classes.
270270
If \tcode{b} is \tcode{true}, the returned bitmask is suitable for
@@ -3850,7 +3850,7 @@
38503850
\indexlibrary{regular expression traits!\idxcode{lookup_classname}}%
38513851
\indexlibrary{\idxcode{lookup_classname}!regular expression traits}%
38523852
The results from multiple calls
3853-
to \tcode{traits_inst.lookup_classname} can be bitwise \logop{OR}'ed
3853+
to \tcode{traits_inst.lookup_classname} can be bitwise \logop{or}'ed
38543854
together and subsequently passed to \tcode{traits_inst.isctype}.
38553855

38563856
\pnum

source/templates.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -1589,8 +1589,8 @@
15891589
called the \defn{parameter mapping}\iref{temp.constr.decl}.
15901590
\begin{note}
15911591
Atomic constraints are formed by constraint normalization\iref{temp.constr.normal}.
1592-
\tcode{E} is never a logical \logop{AND} expression\iref{expr.log.and}
1593-
nor a logical \logop{OR} expression\iref{expr.log.or}.
1592+
\tcode{E} is never a logical \logop{and} expression\iref{expr.log.and}
1593+
nor a logical \logop{or} expression\iref{expr.log.or}.
15941594
\end{note}
15951595

15961596
\pnum
@@ -1728,7 +1728,7 @@
17281728
of that expression.
17291729

17301730
\item Otherwise, the associated constraints are the normal form of a logical
1731-
\logop{AND} expression\iref{expr.log.and} whose operands are in the
1731+
\logop{and} expression\iref{expr.log.and} whose operands are in the
17321732
following order:
17331733
\begin{itemize}
17341734
\item

source/utilities.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -2151,7 +2151,7 @@
21512151

21522152
\pnum
21532153
\remarks
2154-
The exception specification is equivalent to the logical \logop{AND} of the
2154+
The exception specification is equivalent to the logical \logop{and} of the
21552155
following expressions:
21562156

21572157
\begin{codeblock}
@@ -5116,7 +5116,7 @@
51165116

51175117
\pnum
51185118
\remarks
5119-
The exception specification is equivalent to the logical \logop{AND} of
5119+
The exception specification is equivalent to the logical \logop{and} of
51205120
\tcode{is_nothrow_move_con\-structible_v<$\tcode{T}_i$>} for all $i$.
51215121
If \tcode{is_trivially_move_constructible_v<$\tcode{T}_i$>}
51225122
is \tcode{true} for all $i$, this constructor is trivial.
@@ -5729,7 +5729,7 @@
57295729
If an exception is thrown during the exchange of the values of \tcode{*this}
57305730
and \tcode{rhs}, the states of the values of \tcode{*this} and of \tcode{rhs}
57315731
are determined by the exception safety guarantee of \tcode{variant}'s move constructor.
5732-
The exception specification is equivalent to the logical \logop{AND} of
5732+
The exception specification is equivalent to the logical \logop{and} of
57335733
\tcode{is_nothrow_move_constructible_v<$\tcode{T}_i$> \&\& is_nothrow_swappable_v<$\tcode{T}_i$>} for all $i$.
57345734
\end{itemdescr}
57355735

tools/check-source.sh

+4
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ for f in $texfiles; do
177177
done |
178178
fail '"shall", "should", or "may" inside a note' || failed=1
179179

180+
# \logop should use lowercase arguments
181+
grep -n '\\logop{[^}]*[^andor}][^}]*}' $texfiles |
182+
fail 'bad argument for \\logop' || failed=1
183+
180184
# Hanging paragraphs
181185
for f in $texfiles; do
182186
sed -n '/^\\rSec/{=;p;};/^\\pnum/{s/^.*$/x/;=;p;}' $f |

0 commit comments

Comments
 (0)