Skip to content

Commit b73a51c

Browse files
Eeliszygoloid
authored andcommitted
[std] Retire \dcr.
1 parent 0781ce3 commit b73a51c

File tree

10 files changed

+48
-49
lines changed

10 files changed

+48
-49
lines changed

source/atomics.tex

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,8 +1505,8 @@
15051505
Equivalent to: \tcode{return fetch_add(1);}
15061506
\end{itemdescr}
15071507

1508-
\indexlibrarymember{operator\dcr}{atomic_ref<T*>}%
1509-
\indexlibrarymember{operator\dcr}{atomic_ref<\placeholder{integral}>}%
1508+
\indexlibrarymember{operator--}{atomic_ref<T*>}%
1509+
\indexlibrarymember{operator--}{atomic_ref<\placeholder{integral}>}%
15101510
\begin{itemdecl}
15111511
value_type operator--(int) const noexcept;
15121512
\end{itemdecl}
@@ -1529,8 +1529,8 @@
15291529
Equivalent to: \tcode{return fetch_add(1) + 1;}
15301530
\end{itemdescr}
15311531

1532-
\indexlibrarymember{operator\dcr}{atomic_ref<T*>}%
1533-
\indexlibrarymember{operator\dcr}{atomic_ref<\placeholder{integral}>}%
1532+
\indexlibrarymember{operator--}{atomic_ref<T*>}%
1533+
\indexlibrarymember{operator--}{atomic_ref<\placeholder{integral}>}%
15341534
\begin{itemdecl}
15351535
value_type operator--() const noexcept;
15361536
\end{itemdecl}
@@ -2669,8 +2669,8 @@
26692669
Equivalent to: \tcode{return fetch_add(1);}
26702670
\end{itemdescr}
26712671

2672-
\indexlibrarymember{operator\dcr}{atomic<T*>}%
2673-
\indexlibrarymember{operator\dcr}{atomic<\placeholder{integral}>}%
2672+
\indexlibrarymember{operator--}{atomic<T*>}%
2673+
\indexlibrarymember{operator--}{atomic<\placeholder{integral}>}%
26742674
\begin{itemdecl}
26752675
value_type operator--(int) volatile noexcept;
26762676
value_type operator--(int) noexcept;
@@ -2705,8 +2705,8 @@
27052705
Equivalent to: \tcode{return fetch_add(1) + 1;}
27062706
\end{itemdescr}
27072707

2708-
\indexlibrarymember{operator\dcr}{atomic<T*>}%
2709-
\indexlibrarymember{operator\dcr}{atomic<\placeholder{integral}>}%
2708+
\indexlibrarymember{operator--}{atomic<T*>}%
2709+
\indexlibrarymember{operator--}{atomic<\placeholder{integral}>}%
27102710
\begin{itemdecl}
27112711
value_type operator--() volatile noexcept;
27122712
value_type operator--() noexcept;

source/containers.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@
10881088
\tcode{a.back()} &
10891089
\tcode{reference; const_reference} for constant \tcode{a} &
10901090
\tcode{\{ auto tmp = a.end();}\br
1091-
\tcode{ \dcr tmp;}\br
1091+
\tcode{ --tmp;}\br
10921092
\tcode{ return *tmp; \}} &
10931093
\tcode{basic_string},
10941094
\tcode{array},

source/expressions.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3419,9 +3419,9 @@
34193419
\pnum
34203420
\indextext{expression!decrement}%
34213421
\indextext{operator!decrement}%
3422-
\indextext{\idxcode{\dcr}|see{operator, decrement}}%
3423-
\indextext{postfix \tcode{\dcr}}%
3424-
The operand of postfix \tcode{\dcr} is decremented analogously to the
3422+
\indextext{\idxcode{--}|see{operator, decrement}}%
3423+
\indextext{postfix \tcode{--}}%
3424+
The operand of postfix \tcode{--} is decremented analogously to the
34253425
postfix \tcode{++} operator.
34263426
\begin{note}
34273427
For prefix increment and decrement, see~\ref{expr.pre.incr}.
@@ -4378,7 +4378,7 @@
43784378
\indextext{operator!increment}%
43794379
\indextext{prefix \tcode{++}}%
43804380
is modified\iref{defns.access} by adding \tcode{1}.
4381-
\indextext{prefix \tcode{\dcr}}%
4381+
\indextext{prefix \tcode{--}}%
43824382
The operand shall be a modifiable lvalue. The type of the operand shall
43834383
be an arithmetic type other than \cv{}~\tcode{bool},
43844384
or a pointer to a completely-defined object type.
@@ -4396,9 +4396,9 @@
43964396
\pnum
43974397
The operand of prefix
43984398
\indextext{operator!decrement}%
4399-
\tcode{\dcr} is modified\iref{defns.access} by subtracting \tcode{1}.
4399+
\tcode{--} is modified\iref{defns.access} by subtracting \tcode{1}.
44004400
The requirements on the operand of prefix
4401-
\tcode{\dcr} and the properties of its result are otherwise the same as
4401+
\tcode{--} and the properties of its result are otherwise the same as
44024402
those of prefix \tcode{++}.
44034403
\begin{note}
44044404
For postfix increment and decrement, see~\ref{expr.post.incr}.

source/future.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@
9898
\rSec1[depr.volatile.type]{Deprecated \tcode{volatile} types}
9999

100100
\pnum
101-
Postfix \tcode{++} and \tcode{\dcr} expressions\iref{expr.post.incr} and
102-
prefix \tcode{++} and \tcode{\dcr} expressions\iref{expr.pre.incr}
101+
Postfix \tcode{++} and \tcode{--} expressions\iref{expr.post.incr} and
102+
prefix \tcode{++} and \tcode{--} expressions\iref{expr.pre.incr}
103103
of volatile-qualified arithmetic and pointer types are deprecated.
104104

105105
\begin{example}
@@ -924,7 +924,7 @@
924924
if the input sequence has a putback position available, and if
925925
\tcode{strmode \& constant} is zero,
926926
assigns \tcode{c} to
927-
\tcode{*\dcr{}gnext}.
927+
\tcode{*--gnext}.
928928

929929
Returns
930930
\tcode{c}.

source/iostreams.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8098,7 +8098,7 @@
80988098
\tcode{ios_base::out} is
80998099
nonzero,
81008100
assigns \tcode{c} to
8101-
\tcode{*\dcr gptr()}.
8101+
\tcode{*--gptr()}.
81028102

81038103
Returns:
81048104
\tcode{c}.

source/iterators.tex

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2177,22 +2177,22 @@
21772177
\lhdr{Expression} & \chdr{Return type} & \chdr{Operational} & \rhdr{Assertion/note} \\
21782178
& & \chdr{semantics} & \rhdr{pre-/post-condition} \\ \capsep
21792179

2180-
\tcode{\dcr r} &
2180+
\tcode{--r} &
21812181
\tcode{X\&} &
21822182
&
21832183
\expects there exists \tcode{s} such that \tcode{r == ++s}.\br
21842184
\ensures \tcode{r} is dereferenceable.\br
2185-
\tcode{\dcr(++r) == r}.\br
2186-
\tcode{\dcr r == \dcr s} implies \tcode{r == s}.\br
2187-
\tcode{addressof(r) == addressof(\dcr r)}. \\ \hline
2185+
\tcode{--(++r) == r}.\br
2186+
\tcode{--r == --s} implies \tcode{r == s}.\br
2187+
\tcode{addressof(r) == addressof(--r)}. \\ \hline
21882188

2189-
\tcode{r\dcr} &
2189+
\tcode{r--} &
21902190
convertible to \tcode{const X\&} &
21912191
\tcode{\{ X tmp = r;}\br
2192-
\tcode{ \dcr r;}\br
2192+
\tcode{ --r;}\br
21932193
\tcode{ return tmp; \}}& \\ \rowsep
21942194

2195-
\tcode{*r\dcr} &
2195+
\tcode{*r--} &
21962196
\tcode{reference} && \\
21972197
\end{libreqtab4b}
21982198

@@ -2226,11 +2226,11 @@
22262226
\tcode{X\&} &
22272227
\tcode{\{ difference_type m = n;}\br
22282228
\tcode{ if (m >= 0)}\br
2229-
\tcode{ while (m\dcr)}\br
2229+
\tcode{ while (m--)}\br
22302230
\tcode{ ++r;}\br
22312231
\tcode{ else}\br
22322232
\tcode{ while (m++)}\br
2233-
\tcode{ \dcr r;}\br
2233+
\tcode{ --r;}\br
22342234
\tcode{ return r; \}}& \\ \rowsep
22352235

22362236
\tcode{a + n}\br
@@ -3318,7 +3318,7 @@
33183318
\begin{itemdescr}
33193319
\pnum
33203320
\effects
3321-
As if by: \tcode{\dcr current;}
3321+
As if by: \tcode{--current;}
33223322

33233323
\pnum
33243324
\returns
@@ -3341,7 +3341,7 @@
33413341
\end{codeblock}
33423342
\end{itemdescr}
33433343

3344-
\indexlibrarymember{operator\dcr}{reverse_iterator}%
3344+
\indexlibrarymember{operator--}{reverse_iterator}%
33453345
\begin{itemdecl}
33463346
constexpr reverse_iterator& operator--();
33473347
\end{itemdecl}
@@ -3356,7 +3356,7 @@
33563356
\tcode{*this}.
33573357
\end{itemdescr}
33583358

3359-
\indexlibrarymember{operator\dcr}{reverse_iterator}%
3359+
\indexlibrarymember{operator--}{reverse_iterator}%
33603360
\begin{itemdecl}
33613361
constexpr reverse_iterator operator--(int);
33623362
\end{itemdecl}
@@ -4293,22 +4293,22 @@
42934293
Otherwise, equivalent to \tcode{++current}.
42944294
\end{itemdescr}
42954295

4296-
\indexlibrarymember{operator\dcr}{move_iterator}%
4296+
\indexlibrarymember{operator--}{move_iterator}%
42974297
\begin{itemdecl}
42984298
constexpr move_iterator& operator--();
42994299
\end{itemdecl}
43004300

43014301
\begin{itemdescr}
43024302
\pnum
43034303
\effects
4304-
As if by \tcode{\dcr current}.
4304+
As if by \tcode{--current}.
43054305

43064306
\pnum
43074307
\returns
43084308
\tcode{*this}.
43094309
\end{itemdescr}
43104310

4311-
\indexlibrarymember{operator\dcr}{move_iterator}%
4311+
\indexlibrarymember{operator--}{move_iterator}%
43124312
\begin{itemdecl}
43134313
constexpr move_iterator operator--(int);
43144314
\end{itemdecl}

source/macros.tex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@
248248
\newcommand{\CppXVII}{\Cpp{} 2017}
249249
\newcommand{\CppXX}{\Cpp{} 2020}
250250
\newcommand{\opt}[1]{#1\ensuremath{_\mathit{\color{black}opt}}}
251-
\newcommand{\dcr}{-{-}}
252251
\newcommand{\bigoh}[1]{\ensuremath{\mathscr{O}(#1)}}
253252

254253
% Make all tildes a little larger to avoid visual similarity with hyphens.

source/overloading.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3583,7 +3583,7 @@
35833583
\keyword{operator} \terminal{@} \terminal{(} cast-expression \terminal{)}
35843584
\end{ncsimplebnf}
35853585
\begin{note}
3586-
The operators \tcode{++} and \tcode{\dcr}\iref{expr.pre.incr}
3586+
The operators \tcode{++} and \tcode{--}\iref{expr.pre.incr}
35873587
are described in~\ref{over.inc}.
35883588
\end{note}
35893589

@@ -3771,8 +3771,8 @@
37713771
\rSec2[over.inc]{Increment and decrement}
37723772
\indextext{increment operator!overloaded|see{overloading, increment operator}}%
37733773
\indextext{decrement operator!overloaded|see{overloading, decrement operator}}%
3774-
\indextext{prefix ++ and -{-} overloading@prefix \tcode{++} and \tcode{\dcr}!overloading}%
3775-
\indextext{postfix ++ and -{-} overloading@postfix \tcode{++} and \tcode{\dcr}!overloading}%
3774+
\indextext{prefix ++ and -{-} overloading@prefix \tcode{++} and \tcode{--}!overloading}%
3775+
\indextext{postfix ++ and -{-} overloading@postfix \tcode{++} and \tcode{--}!overloading}%
37763776

37773777
\pnum
37783778
An \defnadj{increment}{operator function}
@@ -3832,7 +3832,7 @@
38323832

38333833
\pnum
38343834
A \defnadj{decrement}{operator function}
3835-
is a function named \tcode{\keyword{operator}\dcr}
3835+
is a function named \tcode{\keyword{operator}--}
38363836
and is handled analogously to an increment operator function.
38373837
\indextext{overloading!operator|)}
38383838

source/ranges.tex

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2448,7 +2448,7 @@
24482448
\end{codeblock}
24492449
\end{itemdescr}
24502450

2451-
\indexlibrarymember{operator\dcr}{iota_view::iterator}
2451+
\indexlibrarymember{operator--}{iota_view::iterator}
24522452
\begin{itemdecl}
24532453
constexpr @\exposid{iterator}@& operator--() requires @\exposconcept{decrementable}@<W>;
24542454
\end{itemdecl}
@@ -2463,7 +2463,7 @@
24632463
\end{codeblock}
24642464
\end{itemdescr}
24652465

2466-
\indexlibrarymember{operator\dcr}{iota_view::iterator}
2466+
\indexlibrarymember{operator--}{iota_view::iterator}
24672467
\begin{itemdecl}
24682468
constexpr @\exposid{iterator}@ operator--(int) requires @\exposconcept{decrementable}@<W>;
24692469
\end{itemdecl}
@@ -3439,7 +3439,7 @@
34393439
\end{codeblock}
34403440
\end{itemdescr}
34413441

3442-
\indexlibrarymember{operator\dcr}{filter_view::iterator}%
3442+
\indexlibrarymember{operator--}{filter_view::iterator}%
34433443
\begin{itemdecl}
34443444
constexpr @\exposid{iterator}@& operator--() requires @\libconcept{bidirectional_range}@<V>;
34453445
\end{itemdecl}
@@ -3456,7 +3456,7 @@
34563456
\end{codeblock}
34573457
\end{itemdescr}
34583458

3459-
\indexlibrarymember{operator\dcr}{filter_view::iterator}%
3459+
\indexlibrarymember{operator--}{filter_view::iterator}%
34603460
\begin{itemdecl}
34613461
constexpr @\exposid{iterator}@ operator--(int) requires @\libconcept{bidirectional_range}@<V>;
34623462
\end{itemdecl}
@@ -3962,7 +3962,7 @@
39623962
\end{codeblock}
39633963
\end{itemdescr}
39643964

3965-
\indexlibrarymember{operator\dcr}{transform_view::iterator}%
3965+
\indexlibrarymember{operator--}{transform_view::iterator}%
39663966
\begin{itemdecl}
39673967
constexpr @\exposid{iterator}@& operator--() requires @\libconcept{bidirectional_range}@<@\exposid{Base}@>;
39683968
\end{itemdecl}
@@ -3977,7 +3977,7 @@
39773977
\end{codeblock}
39783978
\end{itemdescr}
39793979

3980-
\indexlibrarymember{operator\dcr}{transform_view::iterator}%
3980+
\indexlibrarymember{operator--}{transform_view::iterator}%
39813981
\begin{itemdecl}
39823982
constexpr @\exposid{iterator}@ operator--(int) requires @\libconcept{bidirectional_range}@<@\exposid{Base}@>;
39833983
\end{itemdecl}
@@ -5257,7 +5257,7 @@
52575257
\end{codeblock}
52585258
\end{itemdescr}
52595259

5260-
\indexlibrarymember{operator\dcr}{join_view::iterator}%
5260+
\indexlibrarymember{operator--}{join_view::iterator}%
52615261
\begin{itemdecl}
52625262
constexpr @\exposid{iterator}@& operator--()
52635263
requires @\exposid{ref-is-glvalue}@ && @\libconcept{bidirectional_range}@<@\exposid{Base}@> &&
@@ -5279,7 +5279,7 @@
52795279
\end{codeblock}
52805280
\end{itemdescr}
52815281

5282-
\indexlibrarymember{operator\dcr}{join_view::iterator}%
5282+
\indexlibrarymember{operator--}{join_view::iterator}%
52835283
\begin{itemdecl}
52845284
constexpr @\exposid{iterator}@ operator--(int)
52855285
requires @\exposid{ref-is-glvalue}@ && @\libconcept{bidirectional_range}@<@\exposid{Base}@> &&

source/time.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,7 @@
14031403
Equivalent to: \tcode{return duration(rep_++);}
14041404
\end{itemdescr}
14051405

1406-
\indexlibrarymember{operator\dcr}{duration}%
1406+
\indexlibrarymember{operator--}{duration}%
14071407
\begin{itemdecl}
14081408
constexpr duration& operator--();
14091409
\end{itemdecl}
@@ -1418,7 +1418,7 @@
14181418
\tcode{*this}.
14191419
\end{itemdescr}
14201420

1421-
\indexlibrarymember{operator\dcr}{duration}%
1421+
\indexlibrarymember{operator--}{duration}%
14221422
\begin{itemdecl}
14231423
constexpr duration operator--(int);
14241424
\end{itemdecl}

0 commit comments

Comments
 (0)