From: Jens Massberg Date: Thu, 12 Jan 2023 10:43:08 +0000 (+0100) Subject: Add default constructurs to `filter_iterator_impl` and `filter_iterator_impl`. X-Git-Tag: upstream/17.0.6~21019 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0995b545ecc8214ddcfd68ede11503fc029cacd4;p=platform%2Fupstream%2Fllvm.git Add default constructurs to `filter_iterator_impl` and `filter_iterator_impl`. Bases of `reverse_iterator` must be default-constructible. This is enforced when using `libstdc++-12` plus C++20. Differential Revision: https://reviews.llvm.org/D141587 --- diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h index 1354268..be8800c 100644 --- a/llvm/include/llvm/ADT/STLExtras.h +++ b/llvm/include/llvm/ADT/STLExtras.h @@ -524,6 +524,8 @@ protected: BaseT::operator++(); } + filter_iterator_base() = default; + // Construct the iterator. The begin iterator needs to know where the end // is, so that it can properly stop when it gets there. The end iterator only // needs the predicate to support bidirectional iteration. @@ -559,6 +561,8 @@ template { public: + filter_iterator_impl() = default; + filter_iterator_impl(WrappedIteratorT Begin, WrappedIteratorT End, PredicateT Pred) : filter_iterator_impl::filter_iterator_base(Begin, End, Pred) {} @@ -580,6 +584,8 @@ class filter_iterator_impl