|
7216 | 7216 | that refers to a non-volatile object
|
7217 | 7217 | whose lifetime began within the evaluation of $E$;
|
7218 | 7218 |
|
| 7219 | +\item |
| 7220 | +an invocation of a destructor\iref{class.dtor} or a function call |
| 7221 | +whose \grammarterm{postfix-expression} names a pseudo-destructor\iref{expr.call}, |
| 7222 | +in either case for an object whose lifetime did not begin within the evaluation of $E$; |
| 7223 | + |
7219 | 7224 | \item
|
7220 | 7225 | a \grammarterm{new-expression}\iref{expr.new},
|
7221 | 7226 | unless the selected allocation function is
|
|
7319 | 7324 | even if the actual evaluation of such a call
|
7320 | 7325 | would otherwise fail the requirements for a core constant expression.
|
7321 | 7326 | Similarly, the evaluation of a call to
|
7322 |
| -\tcode{std::destroy_at}, |
7323 |
| -\tcode{std::ranges::destroy_at}, |
7324 |
| -\tcode{std::construct_at}, or |
7325 |
| -\tcode{std::ranges::construct_at} |
| 7327 | +\tcode{std::construct_at} or \tcode{std::ranges::construct_at} |
7326 | 7328 | does not disqualify $E$
|
7327 |
| -from being a core constant expression unless: |
7328 |
| -\begin{itemize} |
7329 |
| -\item |
7330 |
| - for a call to \tcode{std::construct_at} or \tcode{std::ranges::construct_at}, |
7331 |
| - the first argument, of type \tcode{T*}, |
7332 |
| - does not point |
7333 |
| - to storage allocated with \tcode{std::allocator<T>} or |
7334 |
| - to an object whose lifetime began within the evaluation of $E$, or |
7335 |
| - the evaluation of the underlying constructor call |
7336 |
| - disqualifies $E$ from being a core constant expression, or |
7337 |
| -\item |
7338 |
| - for a call to \tcode{std::destroy_at} or \tcode{std::ranges::destroy_at}, |
7339 |
| - the first argument, of type \tcode{T*}, |
7340 |
| - does not point |
7341 |
| - to storage allocated with \tcode{std::allocator<T>} or |
7342 |
| - to an object whose lifetime began within the evaluation of $E$, or |
7343 |
| - the evaluation of the underlying destructor call |
7344 |
| - disqualifies $E$ from being a core constant expression. |
7345 |
| -\end{itemize} |
| 7329 | +from being a core constant expression unless |
| 7330 | +the first argument, of type \tcode{T*}, does not point |
| 7331 | +to storage allocated with \tcode{std::allocator<T>} or |
| 7332 | +to an object whose lifetime began within the evaluation of $E$, or |
| 7333 | +the evaluation of the underlying constructor call |
| 7334 | +disqualifies $E$ from being a core constant expression. |
7346 | 7335 |
|
7347 | 7336 | \pnum
|
7348 | 7337 | An object \tcode{a} is said to have \defnadj{constant}{destruction} if:
|
|
0 commit comments