Created on 2022-06-08.00:00:00 last changed 4 months ago
This wording is relative to N4910.
Modify [optional.optional.general] as indicated:
-1- Any instance of optional<T> at any given time either contains a value or does not contain a value. When an instance of optional<T> contains a value, it means that an object of type T, referred to as the optional object's contained value, is allocated within the storage of the optional object. Implementations are not permitted to use additional storage, such as dynamic memory, to allocate its contained value.-2-
The contained value shall be allocated in a region of the optional<T> storage suitably aligned for the type T.When an object of type optional<T> is contextually converted to bool, the conversion returns true if the object contains a value; otherwise the conversion returns false. Member val is provided for exposition only.When an optional<T> object contains a value, val points to the contained value.
Modify [variant.variant.general] as indicated:
-1- Any instance of variant at any given time either holds a value of one of its alternative types or holds no value. When an instance of variant holds a value of alternative type T, it means that a value of type T, referred to as the variant object's contained value, is allocated within the storage of the variant object. Implementations are not permitted to use additional storage, such as dynamic memory, to allocate the contained value.
The contained value shall be allocated in a region of the variant storage suitably aligned for all types in Types.
[ 2022-07-25 Approved at July 2022 virtual plenary. Status changed: Ready → WP. ]
[ 2022-07-15; LWG telecon: move to Ready ]
[ 2022-06-21; Reflector poll ]
Set status to Tentatively Ready after nine votes in favour during reflector poll.
LWG 3703 struck redundant language from [expected.void.general] specifying that (1) space allocated for an object is suitably aligned, and (2) a member annotated // exposition only in a class synopsis "is provided for exposition only."Let's also strike similar occurrences from the wording for optional and variant.
|2022-07-25 20:32:58||admin||set||messages: + msg12650|
|2022-07-25 20:32:58||admin||set||status: ready -> wp|
|2022-07-25 20:28:19||admin||set||messages: + msg12624|
|2022-06-21 11:47:28||admin||set||messages: + msg12520|
|2022-06-21 11:47:28||admin||set||status: new -> ready|
|2022-06-11 14:12:45||admin||set||messages: + msg12489|