Skip to content

Fix uninitialized_meow memcpy optimization - #1548

Merged
Stephan T. Lavavej (StephanTLavavej) merged 6 commits into
microsoft:mainfrom
miscco:fix_uninitialized_move
Feb 18, 2021
Merged

Stephan T. Lavavej (StephanTLavavej) merged 6 commits into
microsoft:mainfrom
miscco:fix_uninitialized_move

Conversation

@miscco

Copy link
Copy Markdown
Contributor

Found by accident. Added some tests for the copy/move code pathes.

@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) changed the title Fix uninitialized_meow memcopy optimization Fix uninitialized_meow memcpy optimization Jan 5, 2021
@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) added the bug Something isn't working label Jan 5, 2021
@StephanTLavavej

Copy link
Copy Markdown
Member

It looks like the bug being fixed here is that the code was simply failing to compile - is that correct?

@miscco

Copy link
Copy Markdown
Contributor Author

Yes indeed

@miscco

Copy link
Copy Markdown
Contributor Author

Urgh, this is more broken than I thought. I need to add way more tests for ranges of different length.

Also the uninitialized_meow_n algorithms are broken for the optimization, as we forget to update the input iterator.

@miscco

Copy link
Copy Markdown
Contributor Author

Fixed more bugs and added more tests

Base automatically changed from master to main January 28, 2021 00:35
Comment thread tests/std/tests/P0896R4_ranges_alg_uninitialized_copy/test.cpp Outdated
Comment thread tests/std/tests/P0896R4_ranges_alg_uninitialized_move/test.cpp Outdated
Comment thread stl/inc/xmemory
Comment thread stl/inc/memory Outdated
Comment thread tests/std/tests/P0896R4_ranges_alg_uninitialized_move_n/test.cpp Outdated
Comment thread tests/std/tests/P0896R4_ranges_alg_uninitialized_move_n/test.cpp
Comment thread tests/std/tests/P0896R4_ranges_alg_uninitialized_move/test.cpp Outdated
@StephanTLavavej

Copy link
Copy Markdown
Member

uninitialized_purr!

(That's Cat for "Thanks for fixing this bug in uninitialized_meow!) 😻

@miscco
Michael Schellenberger Costa (miscco) deleted the fix_uninitialized_move branch February 18, 2021 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants