This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Implement not-yet-voted LWG3436
AbandonedPublic

Authored by ldionne on Nov 26 2021, 9:53 AM.

Details

Reviewers
rsmith
Group Reviewers
Restricted Project
Summary

LWG3436 adds support for array types in construct_at. That is necessary
for implementing other voted features, such as arrays in make_shared, so
I am extraordinarily implementing the LWG resolution despite it not
being voted into the Standard yet.

Diff Detail

Event Timeline

ldionne requested review of this revision.Nov 26 2021, 9:53 AM
ldionne created this revision.
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptNov 26 2021, 9:53 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript

@rsmith I suspect that enabling array placement new properly will be more complicated than this, but this simple change solved my immediate issue. Please let me know if that's insufficient.

Since this patch requires both an update to both Clang and libc++ I think it would land the Clang part in a separate patch. Then wait for the CI to have ToT with this version and land that separately.
For now can you run the CI with the Bootstrap build?

libcxx/include/__memory/construct_at.h
40

Please add here also you implement the resolution of 2021-01-16.
I was wondering whether we should add it to the status list for C++23, but looking at the issue it's not certain it will be in C++23.

ldionne marked an inline comment as done.Dec 1 2021, 12:45 PM

Since this patch requires both an update to both Clang and libc++ I think it would land the Clang part in a separate patch. Then wait for the CI to have ToT with this version and land that separately.
For now can you run the CI with the Bootstrap build?

D114649 is the Clang patch!

ldionne abandoned this revision.Sep 6 2023, 10:33 AM

Abandoning since this LWG issue isn't voted yet and we don't need this to implement other features. I've moved it to https://github.com/ldionne/llvm-project/tree/wip/LWG3436-construct_at-arrays and create a GH PR in the future if we want to do this.

Herald added a project: Restricted Project. · View Herald TranscriptSep 6 2023, 10:33 AM