Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P3508R0 constexpr For Raw Memory Algorithms #5148

Open
StephanTLavavej opened this issue Nov 25, 2024 · 1 comment
Open

P3508R0 constexpr For Raw Memory Algorithms #5148

StephanTLavavej opened this issue Nov 25, 2024 · 1 comment
Labels
compiler Compiler work involved cxx26 C++26 feature

Comments

@StephanTLavavej
Copy link
Member

StephanTLavavej commented Nov 25, 2024

WG21-P3508R0 constexpr For Raw Memory Algorithms
WG21-P3369R0 constexpr For uninitialized_default_construct()

INCREASED feature-test macro (expected):

#define __cpp_lib_raw_memory_algorithms 202411L

This depends on WG21-P2747R2 constexpr Placement new, implemented in Clang 20, so we'll be able to make progress with at least one compiler.

Note: We're focused on implementing the remaining library-only features in C++23. Until that's done, we will NOT be accepting PRs for C++26 features.

@StephanTLavavej StephanTLavavej added compiler Compiler work involved cxx26 C++26 feature labels Nov 25, 2024
@github-project-automation github-project-automation bot moved this to Unimplemented in STL C++26 Features Nov 25, 2024
@frederick-vs-ja
Copy link
Contributor

Both MSVC and Clang (but perhaps not EDG, unfortunately) provide magics supporting this before implementing WG21-P2747R2. Godbolt link. It seems that currently (or before C++26) EDG must perform constexpr placement new in std::construct_at.

However, when the value type is an array (although this is a rare case), the support is currently broken. Clang can't placement-new arrays in constant evaluation at all before ver 20. MSVC (and EDG in std::construct_at, in the case of LWG-3436) currently can, but there're now some bugs that can't be worked around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler Compiler work involved cxx26 C++26 feature
Projects
Status: Unimplemented
Development

No branches or pull requests

2 participants