This is an archive of the discontinued LLVM Phabricator instance.

Add default constructurs to `filter_iterator_impl` and `filter_iterator_impl`.
ClosedPublic

Authored by massberg on Jan 12 2023, 2:45 AM.

Details

Summary

Bases of reverse_iterator must be default-constructible. This is enforced when using libstdc++-12 plus C++20.

Diff Detail

Event Timeline

massberg created this revision.Jan 12 2023, 2:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2023, 2:45 AM
massberg requested review of this revision.Jan 12 2023, 2:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2023, 2:45 AM
This revision was not accepted when it landed; it landed in state Needs Review.Jan 13 2023, 7:45 AM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.

Slight NIT: we might want to initialize End and iterator_adaptor_base::I with WrappedIteratorT End = WrappedIteratorT() to avoid uninitialized data members when WrappedIteratorT is a pointer.
This does not happen in practice right now, but if someone actually starts using this constructor in the future, we will at least not have UB.