Skip to content

Use \keyword pervasively #4405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Jun 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions source/algorithms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
\tcode{pred(*first)} contextually converted to \tcode{bool}\iref{conv}.
The function object \tcode{pred} shall not apply any non-constant function
through the dereferenced iterator.
Given a glvalue \tcode{u} of type (possibly \tcode{const}) \tcode{T}
Given a glvalue \tcode{u} of type (possibly \keyword{const}) \tcode{T}
that designates the same object as \tcode{*first},
\tcode{pred(u)} shall be a valid expression
that is equal to \tcode{pred(*first)}.
Expand All @@ -181,9 +181,9 @@
\tcode{binary_pred(*first1, value)} contextually converted to \tcode{bool}\iref{conv}.
\tcode{binary_pred} shall not apply any non-constant function
through the dereferenced iterators.
Given a glvalue \tcode{u} of type (possibly \tcode{const}) \tcode{T1}
Given a glvalue \tcode{u} of type (possibly \keyword{const}) \tcode{T1}
that designates the same object as \tcode{*first1}, and
a glvalue \tcode{v} of type (possibly \tcode{const}) \tcode{T2}
a glvalue \tcode{v} of type (possibly \keyword{const}) \tcode{T2}
that designates the same object as \tcode{*first2},
\tcode{binary_pred(u, *first2)},
\tcode{binary_pred(*first1, v)}, and
Expand Down
70 changes: 35 additions & 35 deletions source/atomics.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1138,10 +1138,10 @@
\tcode{unsigned long},
\tcode{long long},
\tcode{unsigned long long},
\tcode{char8_t},
\tcode{char16_t},
\tcode{char32_t},
\tcode{wchar_t},
\keyword{char8_t},
\keyword{char16_t},
\keyword{char32_t},
\keyword{wchar_t},
and any other types needed by the typedefs in the header \libheaderref{cstdint}.
For each such type \tcode{\placeholder{integral}},
the specialization \tcode{atomic_ref<\placeholder{integral}>} provides
Expand Down Expand Up @@ -1681,7 +1681,7 @@

\begin{itemdescr}
\pnum
The \tcode{static} data member \tcode{is_always_lock_free} is \tcode{true}
The \keyword{static} data member \tcode{is_always_lock_free} is \tcode{true}
if the atomic type's operations are always lock-free, and \tcode{false} otherwise.
\begin{note}
The value of \tcode{is_always_lock_free} is consistent with the value of
Expand Down Expand Up @@ -1735,7 +1735,7 @@

\pnum
\effects
Atomically replaces the value pointed to by \tcode{this}
Atomically replaces the value pointed to by \keyword{this}
with the value of \tcode{desired}. Memory is affected according to the value of
\tcode{order}.
\end{itemdescr}
Expand Down Expand Up @@ -1791,7 +1791,7 @@

\pnum
\returns
Atomically returns the value pointed to by \tcode{this}.
Atomically returns the value pointed to by \keyword{this}.
\end{itemdescr}

\indexlibrarymember{operator \placeholder{type}}{atomic}%
Expand Down Expand Up @@ -1834,14 +1834,14 @@

\pnum
\effects
Atomically replaces the value pointed to by \tcode{this}
Atomically replaces the value pointed to by \keyword{this}
with \tcode{desired}.
Memory is affected according to the value of \tcode{order}.
These operations are atomic read-modify-write operations\iref{intro.multithread}.

\pnum
\returns
Atomically returns the value pointed to by \tcode{this} immediately before the effects.
Atomically returns the value pointed to by \keyword{this} immediately before the effects.
\end{itemdescr}

\indexlibraryglobal{atomic_compare_exchange_weak}%
Expand Down Expand Up @@ -1889,10 +1889,10 @@
\pnum
\effects
Retrieves the value in \tcode{expected}. It then atomically
compares the value representation of the value pointed to by \tcode{this}
compares the value representation of the value pointed to by \keyword{this}
for equality with that previously retrieved from \tcode{expected},
and if true, replaces the value pointed to
by \tcode{this} with that in \tcode{desired}.
by \keyword{this} with that in \tcode{desired}.
If and only if the comparison is \tcode{true}, memory is affected according to the
value of \tcode{success}, and if the comparison is false, memory is affected according
to the value of \tcode{failure}. When only one \tcode{memory_order} argument is
Expand All @@ -1903,11 +1903,11 @@
\tcode{memory_order::relaxed}.
If and only if the comparison is false then, after the atomic operation,
the value in \tcode{expected} is replaced by the value
pointed to by \tcode{this} during the atomic comparison.
pointed to by \keyword{this} during the atomic comparison.
If the operation returns \tcode{true}, these
operations are atomic read-modify-write
operations\iref{intro.multithread} on the memory
pointed to by \tcode{this}.
pointed to by \keyword{this}.
Otherwise, these operations are atomic load operations on that memory.

\pnum
Expand Down Expand Up @@ -1958,7 +1958,7 @@
\pnum
\remarks
A weak compare-and-exchange operation may fail spuriously. That is, even when
the contents of memory referred to by \tcode{expected} and \tcode{this} are
the contents of memory referred to by \tcode{expected} and \keyword{this} are
equal, it may return \tcode{false} and store back to \tcode{expected} the same memory
contents that were originally there.
\begin{note}
Expand Down Expand Up @@ -2114,10 +2114,10 @@
\tcode{unsigned long},
\tcode{long long},
\tcode{unsigned long long},
\tcode{char8_t},
\tcode{char16_t},
\tcode{char32_t},
\tcode{wchar_t},
\keyword{char8_t},
\keyword{char16_t},
\keyword{char32_t},
\keyword{wchar_t},
and any other types needed by the typedefs in the header \libheaderref{cstdint}.
For each such type \tcode{\placeholder{integral}}, the specialization
\tcode{atomic<\placeholder{integral}>} provides additional atomic operations appropriate to integral types.
Expand Down Expand Up @@ -2277,14 +2277,14 @@
\pnum
\effects
Atomically replaces the value pointed to by
\tcode{this} with the result of the computation applied to the
value pointed to by \tcode{this} and the given \tcode{operand}.
\keyword{this} with the result of the computation applied to the
value pointed to by \keyword{this} and the given \tcode{operand}.
Memory is affected according to the value of \tcode{order}.
These operations are atomic read-modify-write operations\iref{intro.multithread}.

\pnum
\returns
Atomically, the value pointed to by \tcode{this} immediately before the effects.
Atomically, the value pointed to by \keyword{this} immediately before the effects.

\pnum
\indextext{signed integer representation!two's complement}%
Expand Down Expand Up @@ -2439,15 +2439,15 @@

\pnum
\effects
Atomically replaces the value pointed to by \tcode{this}
Atomically replaces the value pointed to by \keyword{this}
with the result of the computation applied to the value pointed
to by \tcode{this} and the given \tcode{operand}.
to by \keyword{this} and the given \tcode{operand}.
Memory is affected according to the value of \tcode{order}.
These operations are atomic read-modify-write operations\iref{intro.multithread}.

\pnum
\returns
Atomically, the value pointed to by \tcode{this} immediately before the effects.
Atomically, the value pointed to by \keyword{this} immediately before the effects.

\pnum
\remarks
Expand Down Expand Up @@ -2620,14 +2620,14 @@
\pnum
\effects
Atomically replaces the value pointed to by
\tcode{this} with the result of the computation applied to the
value pointed to by \tcode{this} and the given \tcode{operand}.
\keyword{this} with the result of the computation applied to the
value pointed to by \keyword{this} and the given \tcode{operand}.
Memory is affected according to the value of \tcode{order}.
These operations are atomic read-modify-write operations\iref{intro.multithread}.

\pnum
\returns
Atomically, the value pointed to by \tcode{this} immediately before the effects.
Atomically, the value pointed to by \keyword{this} immediately before the effects.

\pnum
\remarks
Expand Down Expand Up @@ -2876,7 +2876,7 @@

\pnum
\effects
Atomically replaces the value pointed to by \tcode{this} with
Atomically replaces the value pointed to by \keyword{this} with
the value of \tcode{desired} as if by \tcode{p.swap(desired)}.
Memory is affected according to the value of \tcode{order}.
\end{itemdescr}
Expand Down Expand Up @@ -2980,7 +2980,7 @@
If the operation returns \tcode{true},
\tcode{expected} is not accessed after the atomic update and
the operation is an atomic read-modify-write operation\iref{intro.multithread}
on the memory pointed to by \tcode{this}.
on the memory pointed to by \keyword{this}.
Otherwise, the operation is an atomic load operation on that memory, and
\tcode{expected} is updated with the existing value
read from the atomic object in the attempted atomic update.
Expand Down Expand Up @@ -3183,7 +3183,7 @@

\pnum
\effects
Atomically replaces the value pointed to by \tcode{this} with
Atomically replaces the value pointed to by \keyword{this} with
the value of \tcode{desired} as if by \tcode{p.swap(desired)}.
Memory is affected according to the value of \tcode{order}.
\end{itemdescr}
Expand Down Expand Up @@ -3286,7 +3286,7 @@
If the operation returns \tcode{true},
\tcode{expected} is not accessed after the atomic update and
the operation is an atomic read-modify-write operation\iref{intro.multithread}
on the memory pointed to by \tcode{this}.
on the memory pointed to by \keyword{this}.
Otherwise, the operation is an atomic load operation on that memory, and
\tcode{expected} is updated with the existing value
read from the atomic object in the attempted atomic update.
Expand Down Expand Up @@ -3498,7 +3498,7 @@

\pnum
\returns
Atomically returns the value pointed to by \tcode{object} or \tcode{this}.
Atomically returns the value pointed to by \tcode{object} or \keyword{this}.
\end{itemdescr}

\indexlibraryglobal{atomic_flag_test_and_set}%
Expand All @@ -3516,7 +3516,7 @@
\begin{itemdescr}
\pnum
\effects
Atomically sets the value pointed to by \tcode{object} or by \tcode{this} to \tcode{true}. Memory is affected according to the value of
Atomically sets the value pointed to by \tcode{object} or by \keyword{this} to \tcode{true}. Memory is affected according to the value of
\tcode{order}. These operations are atomic read-modify-write operations\iref{intro.multithread}.

\pnum
Expand Down Expand Up @@ -3544,7 +3544,7 @@

\pnum
\effects
Atomically sets the value pointed to by \tcode{object} or by \tcode{this} to
Atomically sets the value pointed to by \tcode{object} or by \keyword{this} to
\tcode{false}. Memory is affected according to the value of \tcode{order}.
\end{itemdescr}

Expand All @@ -3569,7 +3569,7 @@
For \tcode{atomic_flag_wait},
let \tcode{order} be \tcode{memory_order::seq_cst}.
Let \tcode{flag} be \tcode{object} for the non-member functions and
\tcode{this} for the member functions.
\keyword{this} for the member functions.

\pnum
\expects
Expand Down
Loading