Title
Parameter objects are not temporary objects
Status
dr
Section
6.7.7 [class.temporary]
Submitter
Brian Bi

Created on 2024-01-20.00:00:00 last changed 3 weeks ago

Messages

Date: 2024-02-03.00:15:40

Proposed resolution (approved by CWG 2024-02-02):

Change in 6.7.7 [class.temporary] paragraph 7 as follows:

The fourth context is when a temporary object other than a function parameter object is created in the for-range-initializer of a range-based for statement. If such a temporary object would otherwise be destroyed at the end of the for-range-initializer full-expression, the object persists for the lifetime of the reference initialized by the for-range-initializer.
Date: 2024-03-15.00:00:00

[Accepted as a DR at the March, 2024 meeting.]

(From submission #490.)

Parameter objects are not temporary objects, according to 6.7.7 [class.temporary] paragraph 1. An exception hinting at this in 6.7.7 [class.temporary] paragraph 7 should be removed.

History
Date User Action Args
2024-04-05 21:43:46adminsetstatus: ready -> dr
2024-03-20 14:10:31adminsetstatus: tentatively ready -> ready
2024-02-03 00:15:40adminsetstatus: open -> tentatively ready
2024-01-30 15:12:32adminsetmessages: + msg7584
2024-01-20 00:00:00admincreate