This is an archive of the discontinued LLVM Phabricator instance.

[libc++] [ranges] Fix a missing auto(x) cast in ranges::data.
ClosedPublic

Authored by • Quuxplusone on Jan 11 2022, 11:08 AM.

Details

Summary

Also remove some bogus std::forwards. My impression is that these forwards were actually harmless, because ranges::begin(FWD(t)) is always identical to ranges::begin(t) (except when it's ill-formed, and that can't happen in this case). However, they're also superfluous and don't reflect the wording in the standard, so let's eliminate them.

Diff Detail

Event Timeline

• Quuxplusone requested review of this revision.Jan 11 2022, 11:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2022, 11:08 AM
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald Transcript

Consistency in the new test cases.

philnik accepted this revision.Jan 11 2022, 5:01 PM

LGTM

var-const accepted this revision.Jan 11 2022, 7:32 PM
ldionne accepted this revision.Jan 12 2022, 2:12 PM
ldionne added inline comments.
libcxx/include/__ranges/data.h
39

FWIW, these were changed after the original "one ranges proposal", which is what we implemented originally. So I suspect there's going to be at least a couple of papers to trivially mark as having been implemented when we take a look.

This revision is now accepted and ready to land.Jan 12 2022, 2:12 PM