Title
Storage provided by array of char
Status
c++23
Section
6.7.2 [intro.object]
Submitter
Jiang An

Created on 2021-04-15.00:00:00 last changed 9 months ago

Messages

Date: 2023-02-10.06:31:35

Proposed resolution (approved by CWG 2023-02-09):

Change in 6.7.2 [intro.object] paragraph 13 as follows:

An operation that begins the lifetime of an array of char, unsigned char, or std::byte implicitly creates objects within the region of storage occupied by the array.
Date: 2023-02-15.00:00:00

[Accepted as a DR at the February, 2023 meeting.]

According to 6.7.2 [intro.object] paragraph 3,

If a complete object is created (7.6.2.8 [expr.new]) in storage associated with another object e of type “array of N unsigned char” or of type “array of N std::byte” (17.2.1 [cstddef.syn]), that array provides storage for the created object if...

However, note 4 in paragraph 13 indicates that a char array can also provide storage:

An operation that begins the lifetime of an array of char, unsigned char, or std::byte implicitly creates objects within the region of storage occupied by the array.

[Note 4: The array object provides storage for these objects. —end note]

The normative text and the note should be reconciled.

History
Date User Action Args
2023-07-16 13:00:43adminsetstatus: open -> c++23
2023-07-16 13:00:43adminsetstatus: dr -> open
2023-02-18 18:43:04adminsetstatus: ready -> dr
2023-02-10 23:01:52adminsetstatus: tentatively ready -> ready
2023-02-10 06:31:35adminsetmessages: + msg7184
2023-02-10 06:31:35adminsetstatus: review -> tentatively ready
2022-11-11 09:44:52adminsetstatus: open -> review
2021-04-15 00:00:00admincreate