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

Created on 2021-04-15.00:00:00 last changed 3 weeks ago

Messages

Date: 2022-11-11.09:44:52

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.

Possible resolution:

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.
History
Date User Action Args
2022-11-11 09:44:52adminsetstatus: open -> review
2021-04-15 00:00:00admincreate