Skip to content

Commit bdff868

Browse files
jensmaurerzygoloid
authored andcommitted
[any] Use 'contained value' consistently.
This harmonizes the use of 'constained value' across optional, variant, and any, with appropriate index entries. Fixes #1401.
1 parent 685a565 commit bdff868

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

source/utilities.tex

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4169,7 +4169,7 @@
41694169
of one of its alternative types, or it holds no value.
41704170
When an instance of \tcode{variant} holds a value of alternative type \tcode{T},
41714171
it means that a value of type \tcode{T}, referred to as the \tcode{variant}
4172-
object's contained value, is allocated within the storage of the
4172+
object's \defnx{contained value}{contained value!\idxcode{variant}}, is allocated within the storage of the
41734173
\tcode{variant} object.
41744174
Implementations are not permitted to use additional storage, such as dynamic
41754175
memory, to allocate the contained value.
@@ -5410,14 +5410,14 @@
54105410
\pnum
54115411
An object of class \tcode{any} stores an instance of any type that satisfies the constructor requirements or it has no value,
54125412
and this is referred to as the \defn{state} of the class \tcode{any} object.
5413-
The stored instance is called the \defn{contained object}.
5414-
Two states are equivalent if either they both have no value, or both have a value and the contained objects are equivalent.
5413+
The stored instance is called the \defnx{contained value}{contained value!\idxcode{any}},
5414+
Two states are equivalent if either they both have no value, or both have a value and the contained values are equivalent.
54155415

54165416
\pnum
5417-
The non-member \tcode{any_cast} functions provide type-safe access to the contained object.
5417+
The non-member \tcode{any_cast} functions provide type-safe access to the contained value.
54185418

54195419
\pnum
5420-
Implementations should avoid the use of dynamically allocated memory for a small contained object.
5420+
Implementations should avoid the use of dynamically allocated memory for a small contained value.
54215421
\begin{example}
54225422
where the object constructed is holding only an \tcode{int}.
54235423
\end{example}
@@ -5449,7 +5449,7 @@
54495449

54505450
\pnum
54515451
\throws
5452-
Any exceptions arising from calling the selected constructor of the contained object.
5452+
Any exceptions arising from calling the selected constructor for the contained value.
54535453
\end{itemdescr}
54545454

54555455
\indexlibrary{\idxcode{any}!constructor}%
@@ -5587,7 +5587,7 @@
55875587

55885588
\pnum
55895589
\throws
5590-
Any exceptions arising from the copy constructor of the contained object.
5590+
Any exceptions arising from the copy constructor for the contained value.
55915591
\end{itemdescr}
55925592

55935593
\indexlibrarymember{operator=}{any}%
@@ -5673,7 +5673,7 @@
56735673

56745674
\pnum
56755675
\remarks If an exception is thrown during the call to \tcode{VT}'s constructor,
5676-
\tcode{*this} does not contain a value, and any previously contained object
5676+
\tcode{*this} does not contain a value, and any previously contained value
56775677
has been destroyed.
56785678
This function shall not participate in overload resolution unless
56795679
\tcode{is_copy_constructible_v<VT>} is \tcode{true} and
@@ -5707,7 +5707,7 @@
57075707

57085708
\pnum
57095709
\remarks If an exception is thrown during the call to \tcode{VT}'s constructor,
5710-
\tcode{*this} does not contain a value, and any previously contained object
5710+
\tcode{*this} does not contain a value, and any previously contained value
57115711
has been destroyed.
57125712
The function shall not participate in overload resolution unless
57135713
\tcode{is_copy_constructible_v<VT>} is \tcode{true} and
@@ -5722,7 +5722,7 @@
57225722
\begin{itemdescr}
57235723
\pnum
57245724
\effects
5725-
If \tcode{has_value()} is \tcode{true}, destroys the contained object.
5725+
If \tcode{has_value()} is \tcode{true}, destroys the contained value.
57265726

57275727
\pnum
57285728
\postconditions
@@ -5762,7 +5762,7 @@
57625762
\begin{itemdescr}
57635763
\pnum
57645764
\returns
5765-
\tcode{typeid(T)} if \tcode{*this} has a contained object of type \tcode{T},
5765+
\tcode{typeid(T)} if \tcode{*this} has a contained value of type \tcode{T},
57665766
otherwise \tcode{typeid(void)}.
57675767

57685768
\pnum

0 commit comments

Comments
 (0)