Skip to content

Commit 63e94f8

Browse files
committed
[std] Retire \dcr.
1 parent 7a693c7 commit 63e94f8

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
@@ -1500,8 +1500,8 @@
15001500
Equivalent to: \tcode{return fetch_add(1);}
15011501
\end{itemdescr}
15021502

1503-
\indexlibrarymember{operator\dcr}{atomic_ref<T*>}%
1504-
\indexlibrarymember{operator\dcr}{atomic_ref<\placeholder{integral}>}%
1503+
\indexlibrarymember{operator--}{atomic_ref<T*>}%
1504+
\indexlibrarymember{operator--}{atomic_ref<\placeholder{integral}>}%
15051505
\begin{itemdecl}
15061506
value_type operator--(int) const noexcept;
15071507
\end{itemdecl}
@@ -1524,8 +1524,8 @@
15241524
Equivalent to: \tcode{return fetch_add(1) + 1;}
15251525
\end{itemdescr}
15261526

1527-
\indexlibrarymember{operator\dcr}{atomic_ref<T*>}%
1528-
\indexlibrarymember{operator\dcr}{atomic_ref<\placeholder{integral}>}%
1527+
\indexlibrarymember{operator--}{atomic_ref<T*>}%
1528+
\indexlibrarymember{operator--}{atomic_ref<\placeholder{integral}>}%
15291529
\begin{itemdecl}
15301530
value_type operator--() const noexcept;
15311531
\end{itemdecl}
@@ -2664,8 +2664,8 @@
26642664
Equivalent to: \tcode{return fetch_add(1);}
26652665
\end{itemdescr}
26662666

2667-
\indexlibrarymember{operator\dcr}{atomic<T*>}%
2668-
\indexlibrarymember{operator\dcr}{atomic<\placeholder{integral}>}%
2667+
\indexlibrarymember{operator--}{atomic<T*>}%
2668+
\indexlibrarymember{operator--}{atomic<\placeholder{integral}>}%
26692669
\begin{itemdecl}
26702670
value_type operator--(int) volatile noexcept;
26712671
value_type operator--(int) noexcept;
@@ -2700,8 +2700,8 @@
27002700
Equivalent to: \tcode{return fetch_add(1) + 1;}
27012701
\end{itemdescr}
27022702

2703-
\indexlibrarymember{operator\dcr}{atomic<T*>}%
2704-
\indexlibrarymember{operator\dcr}{atomic<\placeholder{integral}>}%
2703+
\indexlibrarymember{operator--}{atomic<T*>}%
2704+
\indexlibrarymember{operator--}{atomic<\placeholder{integral}>}%
27052705
\begin{itemdecl}
27062706
value_type operator--() volatile noexcept;
27072707
value_type operator--() noexcept;

source/containers.tex

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

source/expressions.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3380,9 +3380,9 @@
33803380
\pnum
33813381
\indextext{expression!decrement}%
33823382
\indextext{operator!decrement}%
3383-
\indextext{\idxcode{\dcr}|see{operator, decrement}}%
3384-
\indextext{postfix \tcode{\dcr}}%
3385-
The operand of postfix \tcode{\dcr} is decremented analogously to the
3383+
\indextext{\idxcode{--}|see{operator, decrement}}%
3384+
\indextext{postfix \tcode{--}}%
3385+
The operand of postfix \tcode{--} is decremented analogously to the
33863386
postfix \tcode{++} operator.
33873387
\begin{note}
33883388
For prefix increment and decrement, see~\ref{expr.pre.incr}.
@@ -4319,7 +4319,7 @@
43194319
\indextext{operator!increment}%
43204320
\indextext{prefix \tcode{++}}%
43214321
is modified\iref{defns.access} by adding \tcode{1}.
4322-
\indextext{prefix \tcode{\dcr}}%
4322+
\indextext{prefix \tcode{--}}%
43234323
The operand shall be a modifiable lvalue. The type of the operand shall
43244324
be an arithmetic type other than \cv{}~\tcode{bool},
43254325
or a pointer to a completely-defined object type.
@@ -4337,9 +4337,9 @@
43374337
\pnum
43384338
The operand of prefix
43394339
\indextext{operator!decrement}%
4340-
\tcode{\dcr} is modified\iref{defns.access} by subtracting \tcode{1}.
4340+
\tcode{--} is modified\iref{defns.access} by subtracting \tcode{1}.
43414341
The requirements on the operand of prefix
4342-
\tcode{\dcr} and the properties of its result are otherwise the same as
4342+
\tcode{--} and the properties of its result are otherwise the same as
43434343
those of prefix \tcode{++}.
43444344
\begin{note}
43454345
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}
@@ -918,7 +918,7 @@
918918
if the input sequence has a putback position available, and if
919919
\tcode{strmode \& constant} is zero,
920920
assigns \tcode{c} to
921-
\tcode{*\dcr{}gnext}.
921+
\tcode{*--gnext}.
922922

923923
Returns
924924
\tcode{c}.

source/iostreams.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7977,7 +7977,7 @@
79777977
\tcode{ios_base::out} is
79787978
nonzero,
79797979
assigns \tcode{c} to
7980-
\tcode{*\dcr gptr()}.
7980+
\tcode{*--gptr()}.
79817981

79827982
Returns:
79837983
\tcode{c}.

source/iterators.tex

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

2178-
\tcode{\dcr r} &
2178+
\tcode{--r} &
21792179
\tcode{X\&} &
21802180
&
21812181
\expects there exists \tcode{s} such that \tcode{r == ++s}.\br
21822182
\ensures \tcode{r} is dereferenceable.\br
2183-
\tcode{\dcr(++r) == r}.\br
2184-
\tcode{\dcr r == \dcr s} implies \tcode{r == s}.\br
2185-
\tcode{addressof(r) == addressof(\dcr r)}. \\ \hline
2183+
\tcode{--(++r) == r}.\br
2184+
\tcode{--r == --s} implies \tcode{r == s}.\br
2185+
\tcode{addressof(r) == addressof(--r)}. \\ \hline
21862186

2187-
\tcode{r\dcr} &
2187+
\tcode{r--} &
21882188
convertible to \tcode{const X\&} &
21892189
\tcode{\{ X tmp = r;}\br
2190-
\tcode{ \dcr r;}\br
2190+
\tcode{ --r;}\br
21912191
\tcode{ return tmp; \}}& \\ \rowsep
21922192

2193-
\tcode{*r\dcr} &
2193+
\tcode{*r--} &
21942194
\tcode{reference} && \\
21952195
\end{libreqtab4b}
21962196

@@ -2224,11 +2224,11 @@
22242224
\tcode{X\&} &
22252225
\tcode{\{ difference_type m = n;}\br
22262226
\tcode{ if (m >= 0)}\br
2227-
\tcode{ while (m\dcr)}\br
2227+
\tcode{ while (m--)}\br
22282228
\tcode{ ++r;}\br
22292229
\tcode{ else}\br
22302230
\tcode{ while (m++)}\br
2231-
\tcode{ \dcr r;}\br
2231+
\tcode{ --r;}\br
22322232
\tcode{ return r; \}}& \\ \rowsep
22332233

22342234
\tcode{a + n}\br
@@ -3316,7 +3316,7 @@
33163316
\begin{itemdescr}
33173317
\pnum
33183318
\effects
3319-
As if by: \tcode{\dcr current;}
3319+
As if by: \tcode{--current;}
33203320

33213321
\pnum
33223322
\returns
@@ -3339,7 +3339,7 @@
33393339
\end{codeblock}
33403340
\end{itemdescr}
33413341

3342-
\indexlibrarymember{operator\dcr}{reverse_iterator}%
3342+
\indexlibrarymember{operator--}{reverse_iterator}%
33433343
\begin{itemdecl}
33443344
constexpr reverse_iterator& operator--();
33453345
\end{itemdecl}
@@ -3354,7 +3354,7 @@
33543354
\tcode{*this}.
33553355
\end{itemdescr}
33563356

3357-
\indexlibrarymember{operator\dcr}{reverse_iterator}%
3357+
\indexlibrarymember{operator--}{reverse_iterator}%
33583358
\begin{itemdecl}
33593359
constexpr reverse_iterator operator--(int);
33603360
\end{itemdecl}
@@ -4291,22 +4291,22 @@
42914291
Otherwise, equivalent to \tcode{++current}.
42924292
\end{itemdescr}
42934293

4294-
\indexlibrarymember{operator\dcr}{move_iterator}%
4294+
\indexlibrarymember{operator--}{move_iterator}%
42954295
\begin{itemdecl}
42964296
constexpr move_iterator& operator--();
42974297
\end{itemdecl}
42984298

42994299
\begin{itemdescr}
43004300
\pnum
43014301
\effects
4302-
As if by \tcode{\dcr current}.
4302+
As if by \tcode{--current}.
43034303

43044304
\pnum
43054305
\returns
43064306
\tcode{*this}.
43074307
\end{itemdescr}
43084308

4309-
\indexlibrarymember{operator\dcr}{move_iterator}%
4309+
\indexlibrarymember{operator--}{move_iterator}%
43104310
\begin{itemdecl}
43114311
constexpr move_iterator operator--(int);
43124312
\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
@@ -3554,7 +3554,7 @@
35543554
\keyword{operator} \terminal{@} \terminal{(} cast-expression \terminal{)}
35553555
\end{ncsimplebnf}
35563556
\begin{note}
3557-
The operators \tcode{++} and \tcode{\dcr}\iref{expr.pre.incr}
3557+
The operators \tcode{++} and \tcode{--}\iref{expr.pre.incr}
35583558
are described in~\ref{over.inc}.
35593559
\end{note}
35603560

@@ -3742,8 +3742,8 @@
37423742
\rSec2[over.inc]{Increment and decrement}
37433743
\indextext{increment operator!overloaded|see{overloading, increment operator}}%
37443744
\indextext{decrement operator!overloaded|see{overloading, decrement operator}}%
3745-
\indextext{prefix ++ and -{-} overloading@prefix \tcode{++} and \tcode{\dcr}!overloading}%
3746-
\indextext{postfix ++ and -{-} overloading@postfix \tcode{++} and \tcode{\dcr}!overloading}%
3745+
\indextext{prefix ++ and -{-} overloading@prefix \tcode{++} and \tcode{--}!overloading}%
3746+
\indextext{postfix ++ and -{-} overloading@postfix \tcode{++} and \tcode{--}!overloading}%
37473747

37483748
\pnum
37493749
An \defnadj{increment}{operator function}
@@ -3800,7 +3800,7 @@
38003800

38013801
\pnum
38023802
A \defnadj{decrement}{operator function}
3803-
is a function named \tcode{\keyword{operator}\dcr}
3803+
is a function named \tcode{\keyword{operator}--}
38043804
and is handled analogously to an increment operator function.
38053805
\indextext{overloading!operator|)}
38063806

source/ranges.tex

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

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

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

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

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

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

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

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

5283-
\indexlibrarymember{operator\dcr}{join_view::iterator}%
5283+
\indexlibrarymember{operator--}{join_view::iterator}%
52845284
\begin{itemdecl}
52855285
constexpr @\exposid{iterator}@ operator--(int)
52865286
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)