https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121245
Bug ID: 121245
Summary: __any_input_iterator should not support C++20
input_iterator
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
inplace_vector members with __any_input_iterator constraint should not support
C++20 iterators, because, as far as I understand, the InputIterator template
parameter should refer specifically to C++17 iterator?
#include <inplace_vector>
struct I {
using value_type = int;
using difference_type = int;
value_type operator*() const;
I& operator++();
void operator++(int);
bool operator==(const I&) const;
};
static_assert(std::input_iterator<I>);
int main() {
I it;
std::inplace_vector<int, 42> v(it, it);
}
https://godbolt.org/z/fez6rzrKo