Created on 2024-01-22.00:00:00 last changed 4 months ago
Proposed resolution (approved by CWG 2024-02-16):
Change in 6.7.7 [class.temporary] paragraph 1 as follows:
Temporary objects are created...
- when a prvalue is converted to an xvalue (7.3.5 [conv.rval])
,and- when needed by the implementation to pass or return an object of trivially copyable type (see below)
, and.- when throwing an exception (14.2 [except.throw]). [Note 1: The lifetime of exception objects is described in 14.2 [except.throw]. —end note]
Change in 14.2 [except.throw] paragraph 3 as follows:
Throwing an exception initializesa temporaryan object with dynamic storage duration, called the exception object. If the type of the exception object would be an incomplete type (6.8.1 [basic.types.general]), an abstract class type (11.7.4 [class.abstract]), or a pointer to an incomplete type other than cv void (6.8.4 [basic.compound]) the program is ill-formed.
[Accepted as a DR at the March, 2024 meeting.]
(From submission #492.)
According to 14.2 [except.throw] paragraph 3, the exception object is a temporary object. But none of the possible storage durations of temporary objects matches the behavior of exception objects.
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-07-20 13:52:34 | admin | set | status: dr -> drwp |
2024-04-05 21:43:46 | admin | set | status: ready -> dr |
2024-03-20 14:10:31 | admin | set | status: tentatively ready -> ready |
2024-02-16 23:23:05 | admin | set | messages: + msg7608 |
2024-02-16 23:23:05 | admin | set | status: open -> tentatively ready |
2024-01-22 00:00:00 | admin | create |