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

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

Messages

Date: 2021-04-15.00:00:00

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
2021-04-15 00:00:00admincreate