Created on 2024-07-30.00:00:00 last changed yesterday
Proposed resolution:
This wording is relative to N4986.
Modify [ptr.launder] as indicated:
template<class T> [[nodiscard]] constexpr T* launder(T* p) noexcept;-1- Mandates: !is_function_v<T> && !is_void_v<T> is true.
-2- Preconditions: p represents the address A of a byte in memory. An object Xthat is within its lifetime ([basic.life]) andwhose type is similar ([conv.qual]) to T is located at the address A, and is either within its lifetime ([basic.life]) or is an array element subobject whose containing array object is within its lifetime. All bytes of storage that would be reachable through ([basic.compound]) the result are reachable through p. -3- Returns: A value of type T* that points to X. […]
[ Wrocław 2024-11-18; approved by Core ]
[ 2024-10-02; Reflector poll ]
Set priority to 3 after reflector poll. Needs review by Core.
From issue cplusplus/draft#4553 which is considered non-editorial.
Currently, std::launder has a precondition that the pointed to object must be within its lifetime. However, per the example added by P0593R6, it's probably intended that the result of std::launder should be allowed to point to an array element subobject whose lifetime has not started yet.History | |||
---|---|---|---|
Date | User | Action | Args |
2024-11-19 16:09:07 | admin | set | messages: + msg14458 |
2024-11-19 16:09:07 | admin | set | status: new -> open |
2024-10-02 12:51:34 | admin | set | messages: + msg14409 |
2024-08-03 07:14:09 | admin | set | messages: + msg14304 |
2024-07-30 00:00:00 | admin | create |