Skip to content

Commit bcb5630

Browse files
jensmaurertkoeppe
authored andcommitted
Replace \colcol by :: (#1451)
Explicit line-break hints are added after the :: where necessary. Fixes #1359.
1 parent 7e5537d commit bcb5630

File tree

12 files changed

+44
-46
lines changed

12 files changed

+44
-46
lines changed

source/basic.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2956,8 +2956,8 @@
29562956
\tcode{op\-er\-a\-tor} \tcode{delete}, and \tcode{operator}
29572957
\tcode{delete[]}. \begin{note} The implicit declarations do not introduce
29582958
the names \tcode{std},
2959-
\tcode{std\colcol{}size_t},
2960-
\tcode{std\colcol{}align_val_t},
2959+
\tcode{std::size_t},
2960+
\tcode{std::align_val_t},
29612961
or any other names that the library uses to
29622962
declare these names. Thus, a \grammarterm{new-expression},
29632963
\grammarterm{delete-expression} or function call that refers to one of
@@ -3127,13 +3127,13 @@
31273127
has an object pointer type and it is one of the following:
31283128
\begin{itemize}
31293129
\item the value returned by a call to the \Cpp standard library implementation of
3130-
\tcode{::operator new(std\colcol{}size_t)} or
3131-
\tcode{::operator new(std\colcol{}size_t, std\colcol{}align_val_t)}%
3130+
\tcode{::operator new(std::\brk{}size_t)} or
3131+
\tcode{::operator new(std::size_t, std::align_val_t)}%
31323132
;\footnote{This section does not impose restrictions
31333133
on indirection through pointers to memory not allocated by \tcode{::operator new}. This
31343134
maintains the ability of many \Cpp implementations to use binary libraries and
31353135
components written in other languages. In particular, this applies to C binaries,
3136-
because indirection through pointers to memory allocated by \tcode{std\colcol{}malloc} is not restricted.}
3136+
because indirection through pointers to memory allocated by \tcode{std::malloc} is not restricted.}
31373137

31383138
\item the result of taking the address of an object (or one of its
31393139
subobjects) designated by an lvalue resulting from indirection

source/classes.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1231,7 +1231,7 @@
12311231

12321232
The static data member \tcode{run_chain} of class
12331233
\tcode{process} is defined in global scope; the notation
1234-
\tcode{process\colcol{}run_chain} specifies that the member \tcode{run_chain}
1234+
\tcode{process::run_chain} specifies that the member \tcode{run_chain}
12351235
is a member of class \tcode{process} and in the scope of class
12361236
\tcode{process}. In the static data member definition, the
12371237
\grammarterm{initializer} expression refers to the static data

source/declarators.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@
966966
If the
967967
\grammarterm{constant-expression}
968968
(\ref{expr.const}) is present, it shall be a converted constant
969-
expression of type \tcode{std\colcol{}size_t} and
969+
expression of type \tcode{std::size_t} and
970970
its value shall be greater than zero.
971971
The constant expression specifies the
972972
\indextext{array!bound}%

source/expressions.tex

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3117,11 +3117,11 @@
31173117
\pnum
31183118
Every \grammarterm{constant-expression} in a
31193119
\grammarterm{noptr-new-declarator} shall be a converted constant
3120-
expression~(\ref{expr.const}) of type \tcode{std\colcol{}size_t} and
3120+
expression~(\ref{expr.const}) of type \tcode{std::size_t} and
31213121
shall evaluate to a strictly positive value.
31223122
\indextext{\idxcode{new}}%
31233123
The \grammarterm{expression} in a \grammarterm{noptr-new-declarator} is
3124-
implicitly converted to \tcode{std\colcol{}size_t}.
3124+
implicitly converted to \tcode{std::size_t}.
31253125
\begin{example}
31263126
Given the definition \tcode{int n = 42},
31273127
\tcode{new float[n][5]} is well-formed (because \tcode{n} is the
@@ -3279,7 +3279,7 @@
32793279
allocation has not been extended, the
32803280
\grammarterm{new-expression} passes the amount of space requested to the
32813281
allocation function as the first argument of type
3282-
\tcode{std\colcol{}size_t}. That argument shall be no less than the size
3282+
\tcode{std::size_t}. That argument shall be no less than the size
32833283
of the object being created; it may be greater than the size of the
32843284
object being created only if the object is an array. For arrays of
32853285
\tcode{char} and \tcode{unsigned char}, the difference between the
@@ -3469,7 +3469,7 @@
34693469
will be called; otherwise, no deallocation function will be called. If
34703470
the lookup finds a usual deallocation
34713471
function
3472-
with a parameter of type \tcode{std\colcol{}size_t}~(\ref{basic.stc.dynamic.deallocation})
3472+
with a parameter of type \tcode{std::size_t}~(\ref{basic.stc.dynamic.deallocation})
34733473
and that function,
34743474
considered as a placement deallocation function, would have been
34753475
selected as a match for the allocation function, the program is
@@ -3662,23 +3662,23 @@
36623662
\begin{itemize}
36633663
\item
36643664
If the type has new-extended alignment,
3665-
a function with a parameter of type \tcode{std\colcol{}align_val_t} is preferred;
3665+
a function with a parameter of type \tcode{std::align_val_t} is preferred;
36663666
otherwise a function without such a parameter is preferred.
36673667
If exactly one preferred function is found,
36683668
that function is selected and the selection process terminates.
36693669
If more than one preferred function is found,
36703670
all non-preferred functions are eliminated from further consideration.
36713671
\item
36723672
If the deallocation functions have class scope,
3673-
the one without a parameter of type \tcode{std\colcol{}size_t} is selected.
3673+
the one without a parameter of type \tcode{std::size_t} is selected.
36743674
\item
36753675
If the type is complete and if, for the second alternative (delete
36763676
array) only, the operand is a pointer to a class type with a
36773677
non-trivial destructor or a (possibly multi-dimensional) array thereof,
3678-
the function with a parameter of type \tcode{std\colcol{}size_t} is selected.
3678+
the function with a parameter of type \tcode{std::size_t} is selected.
36793679
\item
36803680
Otherwise, it is unspecified
3681-
whether a deallocation function with a parameter of type \tcode{std\colcol{}size_t}
3681+
whether a deallocation function with a parameter of type \tcode{std::size_t}
36823682
is selected.
36833683
\end{itemize}
36843684

@@ -3687,12 +3687,12 @@
36873687
is executed, the selected deallocation function shall be called with
36883688
the address of the block of storage to be reclaimed as its first argument.
36893689
If a deallocation function
3690-
with a parameter of type \tcode{std\colcol{}align_val_t}
3690+
with a parameter of type \tcode{std::align_val_t}
36913691
is used,
36923692
the alignment of the type of the object to be deleted
36933693
is passed as the corresponding argument.
36943694
If a deallocation function
3695-
with a parameter of type \tcode{std\colcol{}size_t}
3695+
with a parameter of type \tcode{std::size_t}
36963696
is used,
36973697
the size of the block
36983698
is passed as the corresponding argument.%
@@ -4682,7 +4682,7 @@
46824682
evaluating a
46834683
\grammarterm{throw-expression}
46844684
with no operand calls
4685-
\tcode{std\colcol{}terminate()}~(\ref{except.terminate}).
4685+
\tcode{std::\brk{}terminate()}~(\ref{except.terminate}).
46864686

46874687
\rSec1[expr.ass]{Assignment and compound assignment operators}%
46884688
\indextext{expression!assignment and compound assignment}

source/iostreams.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2219,7 +2219,7 @@
22192219
then
22202220
\tcode{state == rdstate()};
22212221
otherwise
2222-
\tcode{rdstate() == (state | ios_base\colcol{}badbit)}.
2222+
\tcode{rdstate() == (state | ios_base::badbit)}.
22232223

22242224
\pnum
22252225
\effects
@@ -3251,7 +3251,7 @@
32513251
returns
32523252
\tcode{underflow()}.
32533253
Otherwise, returns
3254-
\tcode{traits\colcol{}to_int_type(*gptr())}.
3254+
\tcode{traits::to_int_type(*gptr())}.
32553255
\end{itemdescr}
32563256

32573257
\indexlibrarymember{sgetn}{basic_streambuf}%
@@ -7650,9 +7650,9 @@
76507650

76517651
\begin{libtab2}{\tcode{seekoff} positioning}{tab:iostreams.seekoff.positioning}
76527652
{p{2.5in}l}{Conditions}{Result}
7653-
\tcode{(which \& ios_base\colcol{}in)}\tcode{ == ios_base::in} &
7653+
\tcode{(which \& ios_base::in)}\tcode{ == ios_base::in} &
76547654
positions the input sequence \\ \rowsep
7655-
\tcode{(which \& ios_base\colcol{}out)}\tcode{ == ios_base::out} &
7655+
\tcode{(which \& ios_base::out)}\tcode{ == ios_base::out} &
76567656
positions the output sequence \\ \rowsep
76577657
\tcode{(which \& (ios_base::in |}\br
76587658
\tcode{ios_base::out)) ==}\br
@@ -8466,7 +8466,7 @@
84668466
behaves as described in~\ref{filebuf} provided
84678467
\tcode{traits::pos_type}
84688468
is
8469-
\tcode{fpos<traits\colcol{}state_type>}.
8469+
\tcode{fpos<traits::\brk{}state_type>}.
84708470
Otherwise the behavior is undefined.
84718471

84728472
\pnum

source/iterators.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3052,7 +3052,7 @@
30523052
An implementation is permitted to provide equivalent functionality without
30533053
providing a class with this name.
30543054
Class
3055-
\tcode{istreambuf_iterator<charT, traits>\colcol{}proxy}
3055+
\tcode{istreambuf_iterator<charT, traits>::proxy}
30563056
provides a temporary
30573057
placeholder as the return value of the post-increment operator
30583058
(\tcode{operator++}).

source/locales.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@
897897
otherwise, the effect on the C locale, if any, is \impldef{effect on C locale of calling
898898
\tcode{locale::global}}.
899899
No library function other than
900-
\tcode{locale\colcol{}global()}
900+
\tcode{locale::global()}
901901
shall affect the value returned by
902902
\tcode{locale()}.
903903
\begin{note} See~\ref{c.locales} for data race considerations when
@@ -2699,7 +2699,7 @@
26992699
value
27002700
\tcode{state}.
27012701
The specialization
2702-
\tcode{codecvt<char, char, mbstate_t>\colcol{}do_max_length()}
2702+
\tcode{codecvt<char, char, mbstate_t>::do_max_length()}
27032703
returns 1.
27042704
\end{itemdescr}
27052705

@@ -5385,7 +5385,7 @@
53855385
\tcode{get()}
53865386
to retrieve a message from the message catalog identified by the string
53875387
\tcode{name} according to an \impldef{mapping from name to catalog when calling
5388-
\tcode{mes\-sages\colcol{}do_open}} mapping.
5388+
\tcode{mes\-sages::do_open}} mapping.
53895389
The result can be used until it is passed to
53905390
\tcode{close()}.
53915391

source/macros.tex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,6 @@
167167
%%--------------------------------------------------
168168
%% allow line break if needed for justification
169169
\newcommand{\brk}{\discretionary{}{}{}}
170-
% especially for scope qualifier
171-
\newcommand{\colcol}{\brk::\brk}
172170

173171
%%--------------------------------------------------
174172
%% Macros for funky text

source/numerics.tex

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@
14391439
\item
14401440
otherwise
14411441
as \techterm{integral} or equivalently as \techterm{integer-valued},
1442-
if \tcode{numeric_limits<T>\colcol{}is_integer} is \tcode{true};
1442+
if \tcode{numeric_limits<T>::is_integer} is \tcode{true};
14431443
\item
14441444
otherwise
14451445
as \techterm{floating} or equivalently as \techterm{real-valued}.
@@ -2023,7 +2023,7 @@
20232023
\indextext{\idxcode{operator<<}!random number engine requirement}
20242024
& reference to the type of \tcode{os}
20252025
& With \tcode{os.}\textit{fmtflags} set to
2026-
\tcode{ios_base\colcol{}dec|ios_base\colcol{}left}
2026+
\tcode{ios_base::dec|ios_base::left}
20272027
and the fill character set to the space character,
20282028
writes to \tcode{os}
20292029
the textual representation
@@ -2432,8 +2432,8 @@
24322432
If bad input is encountered,
24332433
ensures that \tcode{d} is unchanged by the operation
24342434
and
2435-
calls \tcode{is.setstate(ios\colcol{}failbit)}
2436-
(which may throw \tcode{ios\colcol{}failure}~[\ref{iostate.flags}]).
2435+
calls \tcode{is.setstate(ios::failbit)}
2436+
(which may throw \tcode{ios::failure}~[\ref{iostate.flags}]).
24372437

24382438
\requires \tcode{is} provides a textual representation
24392439
that was previously written
@@ -2805,7 +2805,7 @@
28052805
the modulus $m$
28062806
used throughout this section~\ref{rand.eng.lcong}
28072807
\indextext{\idxcode{linear_congruential_engine}!modulus}
2808-
is \tcode{numeric_limits<result_type>\colcol{}max()} plus $1$.
2808+
is \tcode{numeric_limits<result_type>::max()} plus $1$.
28092809
\begin{note}
28102810
$m$ need not be representable
28112811
as a value of type \tcode{result_type}.
@@ -4206,7 +4206,7 @@
42064206
to avoid any attempt
42074207
to produce more bits of randomness
42084208
than can be held in \tcode{RealType}.}
4209-
is the lesser of \tcode{numeric_limits<RealType>\colcol{}digits}
4209+
is the lesser of \tcode{numeric_limits<RealType>::digits}
42104210
and \tcode{bits},
42114211
and
42124212
$R$ is the value of $ \tcode{g.max()} - \tcode{g.min()} + 1 $.
@@ -4432,7 +4432,7 @@
44324432
\pnum\requires
44334433
$ \tcode{a} \leq \tcode{b} $
44344434
and
4435-
$ \tcode{b} - \tcode{a} \leq \tcode{numeric_limits<RealType>\colcol{}max()} $.
4435+
$ \tcode{b} - \tcode{a} \leq \tcode{numeric_limits<RealType>::max()} $.
44364436

44374437
\pnum\effects Constructs a \tcode{uniform_real_distribution} object;
44384438
\tcode{a} and \tcode{b}

source/preprocessor.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,7 @@
12821282

12831283
\indextext{__STDCPP_DEFAULT_NEW_ALIGNMENT__@\mname{STDCPP_DEFAULT_NEW_ALIGNMENT}}%
12841284
\item \mname{STDCPP_DEFAULT_NEW_ALIGNMENT}\\
1285-
An integer literal of type \tcode{std\colcol{}size_t}
1285+
An integer literal of type \tcode{std::size_t}
12861286
whose value is the alignment guaranteed
12871287
by a call to \tcode{operator new(std::size_t)}
12881288
or \tcode{operator new[](std::size_t)}.

source/strings.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4251,7 +4251,7 @@
42514251
If the function extracts no characters, it calls
42524252
\tcode{is.setstate(ios::failbit)},
42534253
which may throw
4254-
\tcode{ios_base\colcol{}fail\-ure}~(\ref{iostate.flags}).
4254+
\tcode{ios_base::fail\-ure}~(\ref{iostate.flags}).
42554255

42564256
\pnum
42574257
\returns
@@ -4307,7 +4307,7 @@
43074307
(in which case, the
43084308
\tcode{getline}
43094309
function calls
4310-
\tcode{is.setstate(\brk{}ios_base\colcol{}eofbit)}).
4310+
\tcode{is.setstate(\brk{}ios_base::eofbit)}).
43114311
\item
43124312
\tcode{traits::eq(c, delim)}
43134313
for the next available input character
@@ -4320,7 +4320,7 @@
43204320
characters are stored
43214321
(in which case,
43224322
the function calls
4323-
\tcode{is.setstate(ios_base\colcol{}fail\-bit))}~(\ref{iostate.flags})
4323+
\tcode{is.setstate(ios_base::fail\-bit))}~(\ref{iostate.flags})
43244324
\end{itemize}
43254325

43264326
\pnum
@@ -4332,9 +4332,9 @@
43324332

43334333
\pnum
43344334
If the function extracts no characters, it calls
4335-
\tcode{is.setstate(ios_base\colcol{}fail\-bit)}
4335+
\tcode{is.setstate(ios_base::fail\-bit)}
43364336
which may throw
4337-
\tcode{ios_base\colcol{}fail\-ure}~(\ref{iostate.flags}).
4337+
\tcode{ios_base::fail\-ure}~(\ref{iostate.flags}).
43384338

43394339
\pnum
43404340
\returns

source/support.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1854,9 +1854,9 @@
18541854
its value shall represent the address of
18551855
a block of memory allocated by
18561856
an earlier call to a (possibly replaced)
1857-
\tcode{operator new(std\colcol{}size_t)}
1857+
\tcode{operator new(std::size_t)}
18581858
or
1859-
\tcode{operator new(std\colcol{}size_t, std\colcol{}align_val_t)}
1859+
\tcode{operator new(std::size_t, std::align_val_t)}
18601860
which has not been invalidated by an intervening call to
18611861
\tcode{operator delete}.
18621862

@@ -2108,9 +2108,9 @@
21082108
its value shall represent the address of
21092109
a block of memory allocated by
21102110
an earlier call to a (possibly replaced)
2111-
\tcode{operator new[](std\colcol{}size_t)}
2111+
\tcode{operator new[](std::size_t)}
21122112
or
2113-
\tcode{operator new[](std\colcol{}size_t, std\colcol{}align_val_t)}
2113+
\tcode{operator new[](std::size_t, std::align_val_t)}
21142114
which has not been invalidated by an intervening call to
21152115
\tcode{operator delete[]}.
21162116

0 commit comments

Comments
 (0)