This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Fix signatures of counted_iterator::base(), transform_view::iterator::base().
ClosedPublic

Authored by Quuxplusone on Jan 14 2022, 8:47 AM.

Details

Summary

Drive-by stop calling .base() on test iterators in the test, and improve the transform_view::iterator/sentinel tests.

Diff Detail

Event Timeline

Quuxplusone requested review of this revision.Jan 14 2022, 8:47 AM
Quuxplusone created this revision.
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald TranscriptJan 14 2022, 8:47 AM

LGTM, but I think we suffer from the same problem in other iterators, for example transform_view::iterator but probably others too. Any appetite for fixing all of them in this PR?

Quuxplusone edited the summary of this revision. (Show Details)

Turns out that transform_view::iterator is the only other one, that we've already implemented, that doesn't require major other changes for C++20.

move_iterator and reverse_iterator are also affected but require major changes for C++20 that we haven't implemented yet.
filter_view::iterator is affected but we haven't implemented it yet.
lazy_split_view::iterator is affected but we haven't implemented it yet.
elements_view::iterator is affected but we haven't implemented it yet.

Quuxplusone edited the summary of this revision. (Show Details)

Fix a test failure, and improve the transform_view::{iterator/sentinel} tests.

Quuxplusone retitled this revision from [libc++] counted_iterator::base() const& should be noexcept. to [libc++] Fix signatures of counted_iterator::base(), transform_view::iterator::base()..
Quuxplusone edited the summary of this revision. (Show Details)

Rebase to poke CI.

Turns out this is LWG3533; so now we can mark that issue Complete.
CI is still green.

Mordante accepted this revision as: Mordante.Jan 23 2022, 10:07 AM

Turns out this is LWG3533; so now we can mark that issue Complete.

Please add this to the commit message and mention [range.elements.iterator] has been omitted since we haven't implemented that yet.
(I expect the person implementing that to use the current wording in the Standard.)

LTGM!

This revision was not accepted when it landed; it landed in state Needs Review.Jan 26 2022, 4:43 PM
This revision was automatically updated to reflect the committed changes.