Skip to content

Commit 21d7303

Browse files
authored
[utilities, range.nonprop.cache] Simplify direct-non-list-initalization phrasing (#5042)
Fixes #5038.
1 parent 0dc8780 commit 21d7303

File tree

2 files changed

+51
-65
lines changed

2 files changed

+51
-65
lines changed

source/ranges.tex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3315,8 +3315,7 @@
33153315

33163316
\effects
33173317
Calls \tcode{reset()}.
3318-
Then initializes the contained value as if direct-non-list-initializing
3319-
an object of type \tcode{T} with the argument \tcode{*i}.
3318+
Then direct-non-list-initializes the contained value with \tcode{*i}.
33203319

33213320
\ensures
33223321
\tcode{*this} contains a value.

source/utilities.tex

Lines changed: 50 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -2930,8 +2930,8 @@
29302930
\begin{itemdescr}
29312931
\pnum
29322932
\effects
2933-
If \tcode{rhs} contains a value, initializes the contained value as if
2934-
direct-non-list-initializing an object of type \tcode{T} with the expression \tcode{*rhs}.
2933+
If \tcode{rhs} contains a value, direct-non-list-initializes the contained value
2934+
with \tcode{*rhs}.
29352935

29362936
\pnum
29372937
\ensures
@@ -2961,8 +2961,8 @@
29612961

29622962
\pnum
29632963
\effects
2964-
If \tcode{rhs} contains a value, initializes the contained value as if
2965-
direct-non-list-initializing an object of type \tcode{T} with the expression \tcode{std::move(*rhs)}.
2964+
If \tcode{rhs} contains a value, direct-non-list-initializes the contained value
2965+
with \tcode{std::move(*rhs)}.
29662966
\tcode{rhs.has_value()} is unchanged.
29672967

29682968
\pnum
@@ -2993,7 +2993,7 @@
29932993

29942994
\pnum
29952995
\effects
2996-
Initializes the contained value as if direct-non-list-initializing an object of type \tcode{T} with the arguments \tcode{std::forward<Args>(args)...}.
2996+
Direct-non-list-initializes the contained value with \tcode{std::forward<Args>(args)...}.
29972997

29982998
\pnum
29992999
\ensures
@@ -3021,7 +3021,7 @@
30213021

30223022
\pnum
30233023
\effects
3024-
Initializes the contained value as if direct-non-list-initializing an object of type \tcode{T} with the arguments \tcode{il, std::forward<Args>(args)...}.
3024+
Direct-non-list-initializes the contained value with \tcode{il, std::forward<Args>(args)...}.
30253025

30263026
\pnum
30273027
\ensures
@@ -3050,8 +3050,7 @@
30503050

30513051
\pnum
30523052
\effects
3053-
Initializes the contained value as if direct-non-list-initializing
3054-
an object of type \tcode{T} with the expression \tcode{std::forward<U>(v)}.
3053+
Direct-non-list-initializes the contained value with \tcode{std::forward<U>(v)}.
30553054

30563055
\pnum
30573056
\ensures
@@ -3094,8 +3093,7 @@
30943093
\pnum
30953094
\effects
30963095
If \tcode{rhs} contains a value,
3097-
initializes the contained value as if direct-non-list-initializing
3098-
an object of type \tcode{T} with the expression \tcode{*rhs}.
3096+
direct-non-list-initializes the contained value with \tcode{*rhs}.
30993097

31003098
\pnum
31013099
\ensures
@@ -3136,8 +3134,7 @@
31363134
\pnum
31373135
\effects
31383136
If \tcode{rhs} contains a value,
3139-
initializes the contained value as if direct-non-list-initializing
3140-
an object of type \tcode{T} with the expression \tcode{std::move(*rhs)}.
3137+
direct-non-list-initializes the contained value with \tcode{std::move(*rhs)}.
31413138
\tcode{rhs.has_value()} is unchanged.
31423139

31433140
\pnum
@@ -3212,7 +3209,7 @@
32123209

32133210
\rowhdr{\tcode{rhs} contains a value} &
32143211
assigns \tcode{*rhs} to the contained value &
3215-
initializes the contained value as if direct-non-list-initializing an object of type \tcode{T} with \tcode{*rhs} \\
3212+
direct-non-list-initializes the contained value with \tcode{*rhs} \\
32163213
\rowsep
32173214

32183215
\rowhdr{\tcode{rhs} does not contain a value} &
@@ -3264,7 +3261,7 @@
32643261

32653262
\rowhdr{\tcode{rhs} contains a value} &
32663263
assigns \tcode{std::move(*rhs)} to the contained value &
3267-
initializes the contained value as if direct-non-list-initializing an object of type \tcode{T} with \tcode{std::move(*rhs)} \\
3264+
direct-non-list-initializes the contained value with \tcode{std::move(*rhs)} \\
32683265
\rowsep
32693266

32703267
\rowhdr{\tcode{rhs} does not contain a value} &
@@ -3314,7 +3311,7 @@
33143311

33153312
\pnum
33163313
\effects
3317-
If \tcode{*this} contains a value, assigns \tcode{std::forward<U>(v)} to the contained value; otherwise initializes the contained value as if direct-non-list-initializing object of type \tcode{T} with \tcode{std::forward<U>(v)}.
3314+
If \tcode{*this} contains a value, assigns \tcode{std::forward<U>(v)} to the contained value; otherwise direct-non-list-initializes the contained value with \tcode{std::forward<U>(v)}.
33183315

33193316
\pnum
33203317
\ensures
@@ -3363,8 +3360,7 @@
33633360

33643361
\rowhdr{\tcode{rhs} contains a value} &
33653362
assigns \tcode{*rhs} to the contained value &
3366-
initializes the contained value as if direct-non-list-initializing
3367-
an object of type \tcode{T} with \tcode{*rhs} \\
3363+
direct-non-list-initializes the contained value with \tcode{*rhs} \\
33683364
\rowsep
33693365

33703366
\rowhdr{\tcode{rhs} does not contain a value} &
@@ -3427,8 +3423,7 @@
34273423

34283424
\rowhdr{\tcode{rhs} contains a value} &
34293425
assigns \tcode{std::move(*rhs)} to the contained value &
3430-
initializes the contained value as if direct-non-list-initializing
3431-
an object of type \tcode{T} with \tcode{std::move(*rhs)} \\
3426+
direct-non-list-initializes the contained value with \tcode{std::move(*rhs)} \\
34323427
\rowsep
34333428

34343429
\rowhdr{\tcode{rhs} does not contain a value} &
@@ -3468,7 +3463,8 @@
34683463

34693464
\pnum
34703465
\effects
3471-
Calls \tcode{*this = nullopt}. Then initializes the contained value as if direct-non-list-initializing an object of type \tcode{T} with the arguments \tcode{std::forward<Args>(args)...}.
3466+
Calls \tcode{*this = nullopt}. Then direct-non-list-initializes the contained value
3467+
with \tcode{std::forward\brk{}<Args>(args)...}.
34723468

34733469
\pnum
34743470
\ensures
@@ -3499,7 +3495,8 @@
34993495

35003496
\pnum
35013497
\effects
3502-
Calls \tcode{*this = nullopt}. Then initializes the contained value as if direct-non-list-initializing an object of type \tcode{T} with the arguments \tcode{il, std::forward<Args>(args)...}.
3498+
Calls \tcode{*this = nullopt}. Then direct-non-list-initializes the contained value with
3499+
\tcode{il, std::\brk{}forward<Args>(args)...}.
35033500

35043501
\pnum
35053502
\ensures
@@ -3543,15 +3540,15 @@
35433540

35443541
\rowhdr{\tcode{rhs} contains a value} &
35453542
calls \tcode{swap(*(*this), *rhs)} &
3546-
initializes the contained value of \tcode{*this} as if
3547-
direct-non-list-initializing an object of type \tcode{T} with the expression \tcode{std::move(*rhs)},
3543+
direct-non-list-initializes the contained value of \tcode{*this}
3544+
with \tcode{std::move(*rhs)},
35483545
followed by \tcode{rhs.val->T::\~T()};
35493546
postcondition is that \tcode{*this} contains a value and \tcode{rhs} does not contain a value \\
35503547
\rowsep
35513548

35523549
\rowhdr{\tcode{rhs} does not contain a value} &
3553-
initializes the contained value of \tcode{rhs} as if
3554-
direct-non-list-initializing an object of type \tcode{T} with the expression \tcode{std::move(*(*this))},
3550+
direct-non-list-initializes the contained value of \tcode{rhs}
3551+
with \tcode{std::move(*(*this))},
35553552
followed by \tcode{val->T::\~T()};
35563553
postcondition is that \tcode{*this} does not contain a value and \tcode{rhs} contains a value &
35573554
no effect \\
@@ -3810,11 +3807,10 @@
38103807

38113808
\pnum
38123809
\returns
3813-
If \tcode{*this} does not contain a value, \tcode{optional<U>()};
3814-
otherwise, an \tcode{optional<U>} object
3815-
whose contained value is initialized
3816-
as if direct-non-list-initializing an object of type \tcode{U}
3817-
with \tcode{invoke(std::\linebreak forward<F>(f), value())}.
3810+
If \tcode{*this} contains a value, an \tcode{optional<U>} object
3811+
whose contained value is direct-non-list-initialized with
3812+
\tcode{invoke(std::forward<F>(f), value())};
3813+
otherwise, \tcode{optional<U>()}.
38183814
\end{itemdescr}
38193815

38203816
\indexlibrarymember{transform}{optional}
@@ -3843,11 +3839,10 @@
38433839

38443840
\pnum
38453841
\returns
3846-
If \tcode{*this} does not contain a value, \tcode{optional<U>()};
3847-
otherwise, an \tcode{optional<U>} object
3848-
whose contained value is initialized
3849-
as if direct-non-list-initializing an object of type \tcode{U} with
3850-
\tcode{invoke(std::\linebreak forward<F>(f), std::move(value()))}.
3842+
If \tcode{*this} contains a value, an \tcode{optional<U>} object
3843+
whose contained value is direct-non-list-initialized with
3844+
\tcode{invoke(std::forward<F>(f), std::move(value()))};
3845+
otherwise, \tcode{optional<U>()}.
38513846
\end{itemdescr}
38523847

38533848
\indexlibrarymember{or_else}{optional}
@@ -4778,8 +4773,7 @@
47784773
\pnum
47794774
\effects
47804775
Initializes \tcode{*this} to hold the alternative type $\tcode{T}_j$ and
4781-
direct-initializes the contained value as if direct-non-list-initializing it
4782-
with \tcode{std::forward<T>(t)}.
4776+
direct-non-list-initializes the contained value with \tcode{std::forward<T>(t)}.
47834777

47844778
\pnum
47854779
\ensures
@@ -4812,9 +4806,8 @@
48124806

48134807
\pnum
48144808
\effects
4815-
Initializes the contained value as if direct-non-list-initializing
4816-
an object of type \tcode{T}
4817-
with the arguments \tcode{std::forward<Args>(args)...}.
4809+
Direct-non-list-initializes the contained value of type \tcode{T}
4810+
with \tcode{std::forward<Args>(args)...}.
48184811

48194812
\pnum
48204813
\ensures
@@ -4846,9 +4839,8 @@
48464839

48474840
\pnum
48484841
\effects
4849-
Initializes the contained value as if direct-non-list-initializing
4850-
an object of type \tcode{T}
4851-
with the arguments \tcode{il, std::forward<Args>(args)...}.
4842+
Direct-non-list-initializes the contained value of type \tcode{T}
4843+
with \tcode{il, std::forward<Args>(\brk{}args)...}.
48524844

48534845
\pnum
48544846
\ensures
@@ -4881,9 +4873,8 @@
48814873

48824874
\pnum
48834875
\effects
4884-
Initializes the contained value as if direct-non-list-initializing
4885-
an object of type $\tcode{T}_I$
4886-
with the arguments \tcode{std::forward<Args>(args)...}.
4876+
Direct-non-list-initializes the contained value of type $\tcode{T}_I$
4877+
with \tcode{std::forward<Args>(args)...}.
48874878

48884879
\pnum
48894880
\ensures
@@ -4917,9 +4908,8 @@
49174908

49184909
\pnum
49194910
\effects
4920-
Initializes the contained value as if direct-non-list-initializing
4921-
an object of type $\tcode{T}_I$
4922-
with the arguments \tcode{il, std::forward<Args>(args)...}.
4911+
Direct-non-list-initializes the contained value of type $\tcode{T}_I$
4912+
with \tcode{il, std::forward<Args>(\brk{}args)...}.
49234913

49244914
\pnum
49254915
\ensures
@@ -5194,8 +5184,7 @@
51945184
\effects
51955185
Destroys the currently contained value if \tcode{valueless_by_exception()}
51965186
is \tcode{false}.
5197-
Then initializes the contained value as if direct-non-list-initializing
5198-
a value of type $\tcode{T}_I$
5187+
Then direct-non-list-initializes the contained value of type $\tcode{T}_I$
51995188
with the arguments \tcode{std::forward<Ar\-gs>(args)...}.
52005189

52015190
\pnum
@@ -5236,9 +5225,8 @@
52365225
\effects
52375226
Destroys the currently contained value if \tcode{valueless_by_exception()}
52385227
is \tcode{false}.
5239-
Then initializes the contained value as if direct-non-list-initializing
5240-
a value of type $\tcode{T}_I$
5241-
with the arguments \tcode{il, std::forward<Args>(args)...}.
5228+
Then direct-non-list-initializes the contained value of type $\tcode{T}_I$
5229+
with \tcode{il, std::forward<Args>(args)...}.
52425230

52435231
\pnum
52445232
\ensures
@@ -6074,8 +6062,8 @@
60746062

60756063
\pnum
60766064
\effects
6077-
Initializes the contained value as if direct-non-list-initializing an object of
6078-
type \tcode{VT} with the arguments \tcode{std::forward<Args>(args)...}.
6065+
Direct-non-list-initializes the contained value of type \tcode{VT}
6066+
with \tcode{std::forward<Args>(args)...}.
60796067

60806068
\pnum
60816069
\ensures
@@ -6107,8 +6095,8 @@
61076095

61086096
\pnum
61096097
\effects
6110-
Initializes the contained value as if direct-non-list-initializing an object of
6111-
type \tcode{VT} with the arguments \tcode{il, std::forward<Args>(args)...}.
6098+
Direct-non-list-initializes the contained value of type \tcode{VT}
6099+
with \tcode{il, std::forward<Args>(\brk{}args)...}.
61126100

61136101
\pnum
61146102
\ensures
@@ -6228,8 +6216,8 @@
62286216
\pnum
62296217
\effects
62306218
Calls \tcode{reset()}.
6231-
Then initializes the contained value as if direct-non-list-initializing
6232-
an object of type \tcode{VT} with the arguments \tcode{std::forward<Args>(args)...}.
6219+
Then direct-non-list-initializes the contained value of type \tcode{VT}
6220+
with \tcode{std::for\-ward<Args>(args)...}.
62336221

62346222
\pnum
62356223
\ensures
@@ -6271,9 +6259,8 @@
62716259

62726260
\pnum
62736261
\effects
6274-
Calls \tcode{reset()}. Then initializes the contained value
6275-
as if direct-non-list-initializing an object of type \tcode{VT} with the arguments
6276-
\tcode{il, std::forward<Args>(args)...}.
6262+
Calls \tcode{reset()}. Then direct-non-list-initializes the contained value
6263+
of type \tcode{VT} with \tcode{il, std::forward<Args>(args)...}.
62776264

62786265
\pnum
62796266
\ensures

0 commit comments

Comments
 (0)