You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Thanks! I pushed significant changes to the test, @CaseyCarter please double-check.
One commit enhanced pre-existing code. uninitialized_storage now fills its char array with the fillChar instead of leaving it garbage-inited, following the example of uninitialized_fixture. None of the test code is affected by uninitialized_storage gaining a user-provided default ctor, and fillChar (0x7d) is a strict subset of garbage.
If uninitialized_meow didn't properly construct elements, this will help the test more reliably notice that, since there's no chance of garbage-init randomly resulting in an expected value.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.