This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Fix ranges::uninitialized_move{, _n} for move-only types
ClosedPublic

Authored by philnik on Jan 3 2023, 12:53 PM.

Details

Diff Detail

Event Timeline

philnik created this revision.Jan 3 2023, 12:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 3 2023, 12:53 PM
philnik requested review of this revision.Jan 3 2023, 12:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 3 2023, 12:53 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
huixie90 added inline comments.Jan 3 2023, 1:38 PM
libcxx/include/__memory/ranges_uninitialized_algorithms.h
259

The fix looks good to me. But I think it would be good to add some tests (static_assert tests) for the constraints. (both positive and negative test for the constraints), where iter_rvalue_reference_t and iter_reference_t are different (.e.g types with specialized iter_move)

philnik added inline comments.Jan 8 2023, 5:18 AM
libcxx/include/__memory/ranges_uninitialized_algorithms.h
259

I think I'd rather do that in a separate PR, since it's only tangentially related to the bug.

var-const accepted this revision.Jan 9 2023, 3:39 PM

Thanks!

This revision is now accepted and ready to land.Jan 9 2023, 3:39 PM
ldionne accepted this revision.Jan 10 2023, 10:10 AM