@@ -34,10 +34,12 @@
#include <array>
#include <bit> // bit_width
#include <charconv> // __detail::__from_chars_alnum_to_val_table
+#include <string_view>
#include <cstdint>
#include <bits/stl_algo.h>
#include <bits/stl_iterator.h>
-#include <bits/ranges_base.h>
+#include <bits/ranges_base.h> // iterator_t, sentinel_t, input_range, etc.
+#include <bits/ranges_util.h> // view_interface
namespace std _GLIBCXX_VISIBILITY(default)
{
@@ -802,7 +804,7 @@ inline namespace __v15_1_0
operator++(int)
{
auto __tmp = *this;
- ++this;
+ ++*this;
return __tmp;
}
@@ -83,10 +83,21 @@ test_breaks()
VERIFY( iter == gv.end() );
}
+constexpr void
+test_pr115119()
+{
+ // PR 115119 Typo in _Grapheme_cluster_view::_Iterator::operator++(int)
+ uc::_Grapheme_cluster_view gv(" "sv);
+ auto it = std::ranges::begin(gv);
+ it++;
+ VERIFY( it == std::ranges::end(gv) );
+}
+
int main()
{
auto run_tests = []{
test_breaks();
+ test_pr115119();
return true;
};