-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Implement LWG-3918 std::uninitialized_move/_n
and guaranteed copy elision
#5135
Conversation
a358e43
to
8131df8
Compare
tests/std/tests/P0040R3_extending_memory_management_tools/test.cpp
Outdated
Show resolved
Hide resolved
tests/std/tests/P0040R3_extending_memory_management_tools/test.cpp
Outdated
Show resolved
Hide resolved
tests/std/tests/P0040R3_extending_memory_management_tools/test.cpp
Outdated
Show resolved
Hide resolved
tests/std/tests/P0040R3_extending_memory_management_tools/test.cpp
Outdated
Show resolved
Hide resolved
Thanks! I pushed significant changes to the test, @CaseyCarter please double-check. One commit enhanced pre-existing code. If |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
💯 ⛔ 📄 📄 |
Also implements guaranteed copy elision in
std::uninitialized_copy/_n
, which has been implicitly required since C++17 without DR.Corresponding
ranges
algorithms might also need to perform guaranteed copy elision, but that fix wouldn't affect well-formedness (for, IIUC, it would merely reduce moving when initializing constructor arguments). Perhaps we can do that in another PR.Fixes #5113.