// { dg-do compile { target c++20 } } #include struct InputIterator { using difference_type = int; using value_type = int; constexpr int operator*() const noexcept { return 0; } InputIterator& operator++() { return *this; } constexpr void operator++(int) { } }; static_assert( std::input_iterator ); static_assert( !std::forward_iterator ); constexpr bool test_lwg3643() { std::counted_iterator iter({}, 1); iter++; return iter == std::default_sentinel; } static_assert( test_lwg3643() );