|
4169 | 4169 | of one of its alternative types, or it holds no value.
|
4170 | 4170 | When an instance of \tcode{variant} holds a value of alternative type \tcode{T},
|
4171 | 4171 | 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 |
4173 | 4173 | \tcode{variant} object.
|
4174 | 4174 | Implementations are not permitted to use additional storage, such as dynamic
|
4175 | 4175 | memory, to allocate the contained value.
|
|
5410 | 5410 | \pnum
|
5411 | 5411 | An object of class \tcode{any} stores an instance of any type that satisfies the constructor requirements or it has no value,
|
5412 | 5412 | 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. |
5415 | 5415 |
|
5416 | 5416 | \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. |
5418 | 5418 |
|
5419 | 5419 | \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. |
5421 | 5421 | \begin{example}
|
5422 | 5422 | where the object constructed is holding only an \tcode{int}.
|
5423 | 5423 | \end{example}
|
|
5449 | 5449 |
|
5450 | 5450 | \pnum
|
5451 | 5451 | \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. |
5453 | 5453 | \end{itemdescr}
|
5454 | 5454 |
|
5455 | 5455 | \indexlibrary{\idxcode{any}!constructor}%
|
|
5587 | 5587 |
|
5588 | 5588 | \pnum
|
5589 | 5589 | \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. |
5591 | 5591 | \end{itemdescr}
|
5592 | 5592 |
|
5593 | 5593 | \indexlibrarymember{operator=}{any}%
|
|
5673 | 5673 |
|
5674 | 5674 | \pnum
|
5675 | 5675 | \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 |
5677 | 5677 | has been destroyed.
|
5678 | 5678 | This function shall not participate in overload resolution unless
|
5679 | 5679 | \tcode{is_copy_constructible_v<VT>} is \tcode{true} and
|
|
5707 | 5707 |
|
5708 | 5708 | \pnum
|
5709 | 5709 | \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 |
5711 | 5711 | has been destroyed.
|
5712 | 5712 | The function shall not participate in overload resolution unless
|
5713 | 5713 | \tcode{is_copy_constructible_v<VT>} is \tcode{true} and
|
|
5722 | 5722 | \begin{itemdescr}
|
5723 | 5723 | \pnum
|
5724 | 5724 | \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. |
5726 | 5726 |
|
5727 | 5727 | \pnum
|
5728 | 5728 | \postconditions
|
|
5762 | 5762 | \begin{itemdescr}
|
5763 | 5763 | \pnum
|
5764 | 5764 | \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}, |
5766 | 5766 | otherwise \tcode{typeid(void)}.
|
5767 | 5767 |
|
5768 | 5768 | \pnum
|
|
0 commit comments