Skip to content

Commit 3abc16b

Browse files
burblebeetkoeppe
authored andcommitted
LWG4141 Improve prohibitions on "additional storage"
1 parent baec71d commit 3abc16b

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

source/utilities.tex

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3342,8 +3342,7 @@
33423342
Any instance of \tcode{optional<T>} at any given time either contains a value or does not contain a value.
33433343
When an instance of \tcode{optional<T>} \defnx{contains a value}{contains a value!\idxcode{optional}},
33443344
it means that an object of type \tcode{T}, referred to as the optional object's \defnx{contained value}{contained value!\idxcode{optional}},
3345-
is allocated within the storage of the optional object.
3346-
Implementations are not permitted to use additional storage, such as dynamic memory, to allocate its contained value.
3345+
is nested within\iref{intro.object} the optional object.
33473346
When an object of type \tcode{optional<T>} is contextually converted to \tcode{bool},
33483347
the conversion returns \tcode{true} if the object contains a value;
33493348
otherwise the conversion returns \tcode{false}.
@@ -5144,10 +5143,9 @@
51445143
of one of its alternative types or holds no value.
51455144
When an instance of \tcode{variant} holds a value of alternative type \tcode{T},
51465145
it means that a value of type \tcode{T}, referred to as the \tcode{variant}
5147-
object's \defnx{contained value}{contained value!\idxcode{variant}}, is allocated within the storage of the
5146+
object's \defnx{contained value}{contained value!\idxcode{variant}},
5147+
is nested within\iref{intro.object} the
51485148
\tcode{variant} object.
5149-
Implementations are not permitted to use additional storage, such as dynamic
5150-
memory, to allocate the contained value.
51515149

51525150
\pnum
51535151
All types in \tcode{Types} shall meet
@@ -7539,10 +7537,8 @@
75397537
\pnum
75407538
Any object of type \tcode{expected<T, E>} either
75417539
contains a value of type \tcode{T} or
7542-
a value of type \tcode{E} within its own storage.
7543-
Implementations are not permitted to use additional storage,
7544-
such as dynamic memory,
7545-
to allocate the object of type \tcode{T} or the object of type \tcode{E}.
7540+
a value of type \tcode{E}
7541+
nested within\iref{intro.object} it.
75467542
Member \exposid{has_val} indicates whether the \tcode{expected<T, E>} object
75477543
contains an object of type \tcode{T}.
75487544

@@ -8925,9 +8921,8 @@
89258921
\pnum
89268922
Any object of type \tcode{expected<T, E>} either
89278923
represents a value of type \tcode{T}, or
8928-
contains a value of type \tcode{E} within its own storage.
8929-
Implementations are not permitted to use additional storage,
8930-
such as dynamic memory, to allocate the object of type \tcode{E}.
8924+
contains a value of type \tcode{E}
8925+
nested within\iref{intro.object} it.
89318926
Member \exposid{has_val} indicates whether the \tcode{expected<T, E>} object
89328927
represents a value of type \tcode{T}.
89338928

0 commit comments

Comments
 (0)