C++ Logo

STD-DISCUSSION

Advanced search

Subject: Do char arrays provide storage only for implicitly created objects?
From: v.S. F. (de34_at_[hidden])
Date: 2021-03-04 23:29:15


[intro.object]/3<https://eel.is/c++draft/intro.object#3> (added via P0137R1<https://wg21.link/p0137r1>) says that only arrays of unsigned char and arrays of std::byte provide storage for objects created within it (by placement new).

And the note<https://eel.is/c++draft/intro.object#note-4> for [intro.object]/13 (added via P0593R6<https://wg21.link/p0593r6>) says that in addition to these arrays, arrays of char also provide storage for implicitly created objects.

I think the status quo is inconsistent, and “array of N char” should also be present in [intro.object]/3.

(This is one of potential CWG issues for which I mailed to William M. Miller but have not been replied yet.)

Jiang An



STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups