Skip to content

Commit 025f115

Browse files
committed
Reduce spacing after INVOKE, DECAY_COPY, GENERALIZED_SUM,
GENERALIZED_NONCOMMUTATIVE_SUM, and node_handle throughout. This fixes an issue where PDF viewers are unable to find "INVOKE<" (and instead the user must search for "INVOKE <"). Also fixed a few places where we had hardcoded breaks inside \tcode to instead use \brk, removing some spurious whitespace in code snippets where lines have since reflowed. Fixes #1510.
1 parent faa67d5 commit 025f115

File tree

4 files changed

+94
-86
lines changed

4 files changed

+94
-86
lines changed

source/containers.tex

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@
12241224
is empty, it contains no allocator.
12251225

12261226
\pnum
1227-
Class \tcode{\textit{node_handle}} is for exposition only. An implementation is
1227+
Class \tcode{\placeholder{node_handle}} is for exposition only. An implementation is
12281228
permitted to provide equivalent functionality without providing a class with
12291229
this name.
12301230

@@ -1237,7 +1237,7 @@
12371237

12381238
\begin{codeblock}
12391239
template<@\unspecnc@>
1240-
class @\textit{node_handle}@ {
1240+
class @\placeholder{node_handle}@ {
12411241
public:
12421242
// These type declarations are described in Tables \ref{tab:containers.associative.requirements} and \ref{tab:HashRequirements}.
12431243
using value_type = @\seebelownc{}@; // not present for map containers
@@ -1253,10 +1253,10 @@
12531253
optional<allocator_type> alloc_;
12541254

12551255
public:
1256-
constexpr @\textit{node_handle}@() noexcept : ptr_(), alloc_() {}
1257-
~@\textit{node_handle}@();
1258-
@\textit{node_handle}@(@\textit{node_handle}@&&) noexcept;
1259-
@\textit{node_handle}@& operator=(@\textit{node_handle}@&&);
1256+
constexpr @\placeholdernc{node_handle}@() noexcept : ptr_(), alloc_() {}
1257+
~@\placeholdernc{node_handle}@();
1258+
@\placeholdernc{node_handle}@(@\placeholdernc{node_handle}@&&) noexcept;
1259+
@\placeholdernc{node_handle}@& operator=(@\placeholdernc{node_handle}@&&);
12601260

12611261
value_type& value() const; // not present for map containers
12621262
key_type& key() const; // not present for set containers
@@ -1266,32 +1266,32 @@
12661266
explicit operator bool() const noexcept;
12671267
bool empty() const noexcept;
12681268

1269-
void swap(@\textit{node_handle}@&)
1269+
void swap(@\placeholdernc{node_handle}@&)
12701270
noexcept(ator_traits::propagate_on_container_swap::value ||
12711271
ator_traits::is_always_equal::value);
12721272

1273-
friend void swap(@\textit{node_handle}@& x, @\textit{node_handle}@& y) noexcept(noexcept(x.swap(y))) {
1273+
friend void swap(@\placeholdernc{node_handle}@& x, @\placeholdernc{node_handle}@& y) noexcept(noexcept(x.swap(y))) {
12741274
x.swap(y);
12751275
}
12761276
};
12771277
\end{codeblock}
12781278

1279-
\rSec3[container.node.cons]{\tcode{\textit{node_handle}} constructors, copy, and assignment}
1279+
\rSec3[container.node.cons]{\tcode{\placeholder{node_handle}} constructors, copy, and assignment}
12801280

12811281
\begin{itemdecl}
1282-
@\textit{node_handle}@(@\textit{node_handle}@&& nh) noexcept;
1282+
@\placeholdernc{node_handle}@(@\placeholdernc{node_handle}@&& nh) noexcept;
12831283
\end{itemdecl}
12841284

12851285
\begin{itemdescr}
12861286
\pnum
1287-
\effects Constructs a \tcode{\textit{node_handle}} object initializing
1287+
\effects Constructs a \tcode{\placeholder{node_handle}} object initializing
12881288
\tcode{ptr_} with \tcode{nh.ptr_}. Move constructs \tcode{alloc_} with
12891289
\tcode{nh.alloc_}. Assigns \tcode{nullptr} to \tcode{nh.ptr_} and assigns
12901290
\tcode{nullopt} to \tcode{nh.alloc_}.
12911291
\end{itemdescr}
12921292

12931293
\begin{itemdecl}
1294-
@\textit{node_handle}@& operator=(@\textit{node_handle}@&& nh);
1294+
@\placeholdernc{node_handle}@& operator=(@\placeholdernc{node_handle}@&& nh);
12951295
\end{itemdecl}
12961296

12971297
\begin{itemdescr}
@@ -1324,10 +1324,10 @@
13241324
\pnum \throws Nothing.
13251325
\end{itemdescr}
13261326

1327-
\rSec3[container.node.dtor]{\tcode{\textit{node_handle}} destructor}
1327+
\rSec3[container.node.dtor]{\tcode{\placeholder{node_handle}} destructor}
13281328

13291329
\begin{itemdecl}
1330-
~@\textit{node_handle}@();
1330+
~@\placeholdernc{node_handle}@();
13311331
\end{itemdecl}
13321332

13331333
\begin{itemdescr}
@@ -1338,7 +1338,7 @@
13381338
\tcode{ator_traits::rebind_traits<container_node_type>::deallocate}.
13391339
\end{itemdescr}
13401340

1341-
\rSec3[container.node.observers]{\tcode{\textit{node_handle}} observers}
1341+
\rSec3[container.node.observers]{\tcode{\placeholder{node_handle}} observers}
13421342

13431343
\begin{itemdecl}
13441344
value_type& value() const;
@@ -1427,10 +1427,10 @@
14271427
\returns \tcode{ptr_ == nullptr}.
14281428
\end{itemdescr}
14291429

1430-
\rSec3[container.node.modifiers]{\tcode{\textit{node_handle}} modifiers}
1430+
\rSec3[container.node.modifiers]{\tcode{\placeholder{node_handle}} modifiers}
14311431

14321432
\begin{itemdecl}
1433-
void swap(@\textit{node_handle}@& nh)
1433+
void swap(@\placeholdernc{node_handle}@& nh)
14341434
noexcept(ator_traits::propagate_on_container_swap::value ||
14351435
ator_traits::is_always_equal::value);
14361436
\end{itemdecl}
@@ -1456,7 +1456,7 @@
14561456

14571457
\begin{codeblock}
14581458
template <class Iterator, class NodeType>
1459-
struct @\textit{INSERT_RETURN_TYPE}@
1459+
struct @\placeholder{INSERT_RETURN_TYPE}@
14601460
{
14611461
Iterator position;
14621462
bool inserted;
@@ -1465,8 +1465,8 @@
14651465
\end{codeblock}
14661466

14671467
\pnum
1468-
The name \textit{\tcode{INSERT_RETURN_TYPE}} is exposition only.
1469-
\textit{\tcode{INSERT_RETURN_TYPE}} has the template parameters,
1468+
The name \tcode{\placeholder{INSERT_RETURN_TYPE}} is exposition only.
1469+
\tcode{\placeholder{INSERT_RETURN_TYPE}} has the template parameters,
14701470
data members, and special members specified above.
14711471
It has no base classes or members other than those specified.
14721472

@@ -1650,7 +1650,7 @@
16501650
compile time \\ \rowsep
16511651

16521652
\tcode{X::node_type} &
1653-
a specialization of a \tcode{\textit{node_handle}}
1653+
a specialization of a \tcode{\placeholder{node_handle}}
16541654
class template, such that the public nested types are
16551655
the same types as the corresponding types in \tcode{X}. &
16561656
see~\ref{container.node} &
@@ -2289,7 +2289,7 @@
22892289
\\ \rowsep
22902290
%
22912291
\tcode{X::node_type} &
2292-
a specialization of a \tcode{\textit{node_handle}}
2292+
a specialization of a \tcode{\placeholder{node_handle}}
22932293
class template, such that the public nested types are
22942294
the same types as the corresponding types in \tcode{X}. &
22952295
see~\ref{container.node} &
@@ -6081,7 +6081,7 @@
60816081
using reverse_iterator = std::reverse_iterator<iterator>;
60826082
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
60836083
using node_type = @\unspec@;
6084-
using insert_return_type = @\textit{INSERT_RETURN_TYPE}@<iterator, node_type>;
6084+
using insert_return_type = @\placeholdernc{INSERT_RETURN_TYPE}@<iterator, node_type>;
60856085

60866086
class value_compare {
60876087
friend class map;
@@ -6959,7 +6959,7 @@
69596959
using reverse_iterator = std::reverse_iterator<iterator>;
69606960
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
69616961
using node_type = @\unspec@;
6962-
using insert_return_type = @\textit{INSERT_RETURN_TYPE}@<iterator, node_type>;
6962+
using insert_return_type = @\placeholdernc{INSERT_RETURN_TYPE}@<iterator, node_type>;
69636963

69646964
// \ref{set.cons}, construct/copy/destroy
69656965
set() : set(Compare()) { }
@@ -7662,7 +7662,7 @@
76627662
using local_iterator = @\impdefx{type of \tcode{unordered_map::local_iterator}}@; // see \ref{container.requirements}
76637663
using const_local_iterator = @\impdefx{type of \tcode{unordered_map::const_local_iterator}}@; // see \ref{container.requirements}
76647664
using node_type = @\unspec@;
7665-
using insert_return_type = @\textit{INSERT_RETURN_TYPE}@<iterator, node_type>;
7665+
using insert_return_type = @\placeholdernc{INSERT_RETURN_TYPE}@<iterator, node_type>;
76667666

76677667
// \ref{unord.map.cnstr}, construct/copy/destroy
76687668
unordered_map();
@@ -8578,7 +8578,7 @@
85788578
using local_iterator = @\impdefx{type of \tcode{unordered_set::local_iterator}}@; // see \ref{container.requirements}
85798579
using const_local_iterator = @\impdefx{type of \tcode{unordered_set::const_local_iterator}}@; // see \ref{container.requirements}
85808580
using node_type = @\unspec@;
8581-
using insert_return_type = @\textit{INSERT_RETURN_TYPE}@<iterator, node_type>;
8581+
using insert_return_type = @\placeholdernc{INSERT_RETURN_TYPE}@<iterator, node_type>;
85828582

85838583
// \ref{unord.set.cnstr}, construct/copy/destroy
85848584
unordered_set();

source/numerics.tex

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,23 @@
3030

3131
\rSec1[numerics.defns]{Definitions}
3232

33-
\indexlibrary{generalized_noncommutative_sum@\tcode{\textit{GENERALIZED_NONCOMMUTATIVE_SUM}}}%
33+
\indexlibrary{generalized_noncommutative_sum@\tcode{\placeholder{GENERALIZED_NONCOMMUTATIVE_SUM}}}%
3434
\pnum
35-
Define \tcode{\textit{GENERALIZED_NONCOMMUTATIVE_SUM}(op, a1, ..., aN)} as follows:
35+
Define \tcode{\placeholdernc{GENERALIZED_NONCOMMUTATIVE_SUM}(op, a1, ..., aN)} as follows:
3636
\begin{itemize}
3737
\item
3838
\tcode{a1} when \tcode{N} is \tcode{1}, otherwise
3939

4040
\item
41-
\tcode{op(\textit{GENERALIZED_NONCOMMUTATIVE_SUM}(op, a1, ..., aK),} \\
42-
\tcode{\phantom{op(}\textit{GENERALIZED_NONCOMMUTATIVE_SUM}(op, aM, ..., aN))}
41+
\tcode{op(\placeholdernc{GENERALIZED_NONCOMMUTATIVE_SUM}(op, a1, ..., aK),} \\
42+
\tcode{\phantom{op(}\placeholdernc{GENERALIZED_NONCOMMUTATIVE_SUM}(op, aM, ..., aN))}
4343
for any \tcode{K} where $1 < \mathtt{K}+1 = \mathtt{M} \leq \mathtt{N}$.
4444
\end{itemize}
4545

46-
\indexlibrary{generalized_sum@\tcode{\textit{GENERALIZED_SUM}}}%
46+
\indexlibrary{generalized_sum@\tcode{\placeholder{GENERALIZED_SUM}}}%
4747
\pnum
48-
Define \tcode{\textit{GENERALIZED_SUM}(op, a1, ..., aN)} as
49-
\tcode{\textit{GENERALIZED_NONCOMMUTATIVE_SUM}(op, b1, ..., bN)}
48+
Define \tcode{\placeholdernc{GENERALIZED_SUM}(op, a1, ..., aN)} as
49+
\tcode{\placeholdernc{GENERALIZED_NONCOMMUTATIVE_SUM}(op, b1, ..., bN)},
5050
where
5151
\tcode{b1, ..., bN} may be any permutation of \tcode{a1, ..., aN}.
5252

@@ -8946,7 +8946,7 @@
89468946

89478947
\pnum
89488948
\returns
8949-
\tcode{\textit{GENERALIZED_SUM}(binary_op, init, *i, ...)} for every \tcode{i} in \range{first}{last}.
8949+
\tcode{\placeholdernc{GENERALIZED_SUM}(binary_op, init, *i, ...)} for every \tcode{i} in \range{first}{last}.
89508950

89518951
\pnum
89528952
\complexity
@@ -9074,7 +9074,7 @@
90749074
\pnum
90759075
\returns
90769076
\begin{codeblock}
9077-
@\textit{GENERALIZED_SUM}@(binary_op1, init, binary_op2(*i, *(first2 + (i - first1))), ...)
9077+
@\placeholdernc{GENERALIZED_SUM}@(binary_op1, init, binary_op2(*i, *(first2 + (i - first1))), ...)
90789078
\end{codeblock}
90799079
for every iterator \tcode{i} in \range{first1}{last1}.
90809080

@@ -9117,7 +9117,7 @@
91179117
\pnum
91189118
\returns
91199119
\begin{codeblock}
9120-
@\textit{GENERALIZED_SUM}@(binary_op, init, unary_op(*i), ...)
9120+
@\placeholdernc{GENERALIZED_SUM}@(binary_op, init, unary_op(*i), ...)
91219121
\end{codeblock}
91229122
for every iterator \tcode{i} in \range{first}{last}.
91239123

source/threads.tex

Lines changed: 37 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,9 @@
272272

273273
\pnum
274274
In several places in this Clause the operation
275-
\indextext{DECAY_COPY@\tcode{\textit{DECAY_COPY}}}%
276-
\indexlibrary{DECAY_COPY@\tcode{\textit{DECAY_COPY}}}%
277-
{\tcode{\textit{DECAY_COPY}(x)}} is used. All
275+
\indextext{DECAY_COPY@\tcode{\placeholder{DECAY_COPY}}}%
276+
\indexlibrary{DECAY_COPY@\tcode{\placeholder{DECAY_COPY}}}%
277+
{\tcode{\placeholdernc{DECAY_COPY}(x)}} is used. All
278278
such uses mean call the function \tcode{decay_copy(x)} and use the
279279
result, where \tcode{decay_copy} is defined as follows:
280280

@@ -520,8 +520,12 @@
520520
\pnum
521521
\requires\ \tcode{F} and each \tcode{Ti} in \tcode{Args} shall satisfy the
522522
\tcode{MoveConstructible} requirements.
523-
\tcode{\textit{INVOKE}(\textit{DECAY_COPY}(}
524-
\tcode{std::forward<F>(f)), \textit{DECAY_COPY}(std::forward<Args>(args))...)}~(\ref{func.require}) shall be
523+
\tcode{%
524+
\placeholdernc{INVOKE}(\brk{}%
525+
\placeholdernc{DECAY_COPY}(\brk{}%
526+
std::forward<F>(f)),
527+
\placeholdernc{DECAY_COPY}(\brk{}%
528+
std::forward<Args>(\brk{}args))...)}~(\ref{func.require}) shall be
525529
a valid expression.
526530

527531
\pnum
@@ -531,14 +535,18 @@
531535

532536
\pnum
533537
\effects\ Constructs an object of type \tcode{thread}. The new thread of execution executes
534-
\tcode{\textit{INVOKE}(\textit{DECAY_COPY}(}\
535-
\tcode{std::forward<F>(f)), \textit{DECAY_COPY}(std::forward<Args>(args))...)} with the calls to
536-
\brk{}\tcode{\textit{DECAY_COPY}} being evaluated in the constructing thread. Any return value from this invocation
538+
\tcode{%
539+
\placeholdernc{INVOKE}(\brk{}%
540+
\placeholdernc{DECAY_COPY}(\brk{}%
541+
std::forward<F>(f)),
542+
\placeholdernc{DECAY_COPY}(\brk{}%
543+
std::forward<Args>(\brk{}args))...)} with the calls to
544+
\tcode{\placeholder{DECAY_COPY}} being evaluated in the constructing thread. Any return value from this invocation
537545
is ignored. \begin{note} This implies that any exceptions not thrown from the invocation of the copy
538546
of \tcode{f} will be thrown in the constructing thread, not the new thread. \end{note} If the
539547
invocation of
540-
\tcode{\textit{INVOKE}(\textit{DECAY_COPY}(}
541-
\tcode{std::forward<F>(f)), \textit{DECAY_COPY}(std::forward<Args>(args))...)}
548+
\tcode{\placeholdernc{INVOKE}(\placeholdernc{DECAY_COPY}(}
549+
\tcode{std::forward<F>(f)), \placeholdernc{DECAY_COPY}(std::forward<Args>(args))...)}
542550
terminates with an uncaught exception, \tcode{terminate} shall be called.
543551

544552

@@ -2782,17 +2790,17 @@
27822790
\begin{itemdescr}
27832791
\pnum
27842792
\requires
2785-
\tcode{\textit{INVOKE}(\brk{}}
2786-
\tcode{std::forward<Callable>(func),
2787-
std::forward<Args>(args)...)} \brk{}(\ref{func.require}) shall be
2793+
\tcode{\placeholdernc{INVOKE}(\brk{}%
2794+
std::forward<Callable>(func),
2795+
std::forward<Args>(args)...)}~(\ref{func.require}) shall be
27882796
a valid expression.
27892797

27902798
\pnum
27912799
\effects An execution of \tcode{call_once} that does not call its \tcode{func} is a
27922800
\term{passive} execution. An execution of \tcode{call_once} that calls its \tcode{func}
27932801
is an \term{active} execution. An active execution shall call
2794-
\tcode{\textit{INVOKE}(}
2795-
\tcode{std::forward<Callable>(func),
2802+
\tcode{\placeholdernc{INVOKE}(\brk{}%
2803+
std::forward<Callable>(func),
27962804
std::forward<Args>(args)...)}. If such a call to \tcode{func}
27972805
throws an exception the execution is \term{exceptional}, otherwise it is \term{returning}.
27982806
An exceptional execution shall propagate the exception to the caller of
@@ -4822,17 +4830,17 @@
48224830
\begin{itemize}
48234831
\item
48244832
If \tcode{launch::async} is set in \tcode{policy}, calls
4825-
\tcode{\textit{INVOKE}(\textit{DECAY_COPY}(std::forward<F>(f)),}
4826-
\tcode{\textit{DECAY_COPY}(std::forward<Args>(args))...)}
4833+
\tcode{\placeholdernc{INVOKE}(\placeholdernc{DECAY_COPY}(std::forward<F>(f)),}
4834+
\tcode{\placeholdernc{DECAY_COPY}(std::forward<Args>(args))...)}
48274835
(\ref{func.require}, \ref{thread.thread.constr})
48284836
as if in a new thread of execution represented by a \tcode{thread} object
4829-
with the calls to \tcode{\textit{DECAY_COPY}()} being evaluated in the thread that called \tcode{async}.
4837+
with the calls to \tcode{\placeholdernc{DECAY_COPY}()} being evaluated in the thread that called \tcode{async}.
48304838
Any return value
48314839
is stored as the result in the
48324840
shared state. Any exception propagated from
48334841
the execution of
4834-
\tcode{\textit{INVOKE}(\textit{DECAY_COPY}(std::forward<F>(f)),
4835-
\textit{DECAY_COPY}(std::forward<Args>(args))...)}
4842+
\tcode{\placeholdernc{INVOKE}(\placeholdernc{DECAY_COPY}(std::forward<F>(f)),
4843+
\placeholdernc{DECAY_COPY}(std::forward<Args>(args))...)}
48364844
is stored as the exceptional result in the shared state.
48374845
The \tcode{thread} object is
48384846
stored in the shared state
@@ -4841,13 +4849,13 @@
48414849

48424850
\item
48434851
If \tcode{launch::deferred} is set in \tcode{policy},
4844-
stores \tcode{\textit{DECAY_COPY}(std::forward<F>(f))} and
4845-
\tcode{\textit{DECAY_COPY}(std::forward<Args>(args))...}
4852+
stores \tcode{\placeholdernc{DECAY_COPY}(std::forward<F>(f))} and
4853+
\tcode{\placeholdernc{DECAY_COPY}(std::forward<Args>(args))...}
48464854
in the shared state. These copies of \tcode{f} and \tcode{args} constitute
48474855
a \defn{deferred function}. Invocation of the deferred function evaluates
4848-
\tcode{\textit{INVOKE}(std::move(g), std::move(xyz))} where \tcode{g} is the stored value of
4849-
\tcode{\textit{DECAY_COPY}(std::forward<F>(f))} and \tcode{xyz} is the stored copy of
4850-
\tcode{\textit{DECAY_COPY}(std::forward<Args>(args))...}.
4856+
\tcode{\placeholdernc{INVOKE}(std::move(g), std::move(xyz))} where \tcode{g} is the stored value of
4857+
\tcode{\placeholdernc{DECAY_COPY}(std::forward<F>(f))} and \tcode{xyz} is the stored copy of
4858+
\tcode{\placeholdernc{DECAY_COPY}(std::forward<Args>(args))...}.
48514859
Any return value is stored
48524860
as the result in the shared state.
48534861
Any exception propagated
@@ -4861,7 +4869,7 @@
48614869
on an asynchronous return object referring to
48624870
this shared state shall invoke the
48634871
deferred function in the thread that called the waiting function.
4864-
Once evaluation of \tcode{\textit{INVOKE}(std::move(g), std::move(xyz))} begins, the function is no longer
4872+
Once evaluation of \tcode{\placeholdernc{INVOKE}(std::move(g), std::move(xyz))} begins, the function is no longer
48654873
considered deferred.
48664874
\begin{note} If this policy is specified together with other policies, such as when using a
48674875
\tcode{policy} value of \tcode{launch::async | launch::deferred}, implementations should defer
@@ -5026,7 +5034,7 @@
50265034
\begin{itemdescr}
50275035
\pnum
50285036
\requires
5029-
\tcode{\textit{INVOKE}<R>(f, t1, t2, ..., tN)}, where \tcode{t1, t2, ..., tN} are values
5037+
\tcode{\placeholdernc{INVOKE}<R>(f, t1, t2, ..., tN)}, where \tcode{t1, t2, ..., tN} are values
50305038
of the corresponding types in \tcode{ArgTypes...}, shall be a valid expression. Invoking
50315039
a copy of \tcode{f} shall behave the same as invoking \tcode{f}.
50325040

@@ -5148,7 +5156,7 @@
51485156

51495157
\begin{itemdescr}
51505158
\pnum
5151-
\effects As if by \tcode{\textit{INVOKE}<R>(f, t1, t2, ..., tN)},
5159+
\effects As if by \tcode{\placeholdernc{INVOKE}<R>(f, t1, t2, ..., tN)},
51525160
where \tcode{f} is the
51535161
stored task of \tcode{*this} and
51545162
\tcode{t1, t2, ..., tN} are the values in \tcode{args...}. If the task returns normally,
@@ -5178,7 +5186,7 @@
51785186

51795187
\begin{itemdescr}
51805188
\pnum
5181-
\effects As if by \tcode{\textit{INVOKE}<R>(f, t1, t2, ..., tN)},
5189+
\effects As if by \tcode{\placeholdernc{INVOKE}<R>(f, t1, t2, ..., tN)},
51825190
where \tcode{f} is the stored task and
51835191
\tcode{t1, t2, ..., tN} are the values in \tcode{args...}. If the task returns normally,
51845192
the return value is stored as the asynchronous result in the shared state of

0 commit comments

Comments
 (0)