This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-08-11
2489. Storage provided by array of charSection: 6.8.2 [intro.object] Status: C++23 Submitter: Jiang An Date: 2021-04-15[Accepted as a DR at the February, 2023 meeting.]
According to 6.8.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.
Proposed resolution (approved by CWG 2023-02-09):
Change in 6.8.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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4