Implement LWG-3918 std::uninitialized_move/_n and guaranteed copy elision by frederick-vs-ja · Pull Request #5135 · microsoft/STL (original) (raw)

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.