From 0995b545ecc8214ddcfd68ede11503fc029cacd4 Mon Sep 17 00:00:00 2001 From: Jens Massberg Date: Thu, 12 Jan 2023 11:43:08 +0100 Subject: [PATCH] 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 --- llvm/include/llvm/ADT/STLExtras.h | 6 ++++++ 1 file changed, 6 insertions(+) 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