|
| 1 | +From c9e05b03c18e898be604ab90401476e9c473cc52 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Jonathan Wakely < [email protected]> |
| 3 | +Date: Thu, 16 May 2024 17:15:55 +0100 |
| 4 | +Subject: [PATCH] libstdc++: Fix typo in _Grapheme_cluster_view::_Iterator |
| 5 | + [PR115119] |
| 6 | + |
| 7 | +libstdc++-v3/ChangeLog: |
| 8 | + |
| 9 | + PR libstdc++/115119 |
| 10 | + * include/bits/unicode.h (_Iterator::operator++(int)): Fix typo |
| 11 | + in increment expression. |
| 12 | + * testsuite/ext/unicode/grapheme_view.cc: Check post-increment |
| 13 | + on view's iterator. |
| 14 | + |
| 15 | + Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=c9e05b03c18e898be604ab90401476e9c473cc52 |
| 16 | + Modified paths, to make it work |
| 17 | +--- |
| 18 | + bits/unicode.h | 6 ++++-- |
| 19 | + 1 files changed, 4 insertions(+), 2 deletions(-) |
| 20 | + |
| 21 | +diff --git a/bits/unicode.h b/bits/unicode.h |
| 22 | +index 46238143fb61..a14a17c5dfcf 100644 |
| 23 | +--- a/bits/unicode.h |
| 24 | ++++ b/bits/unicode.h |
| 25 | +@@ -34,10 +34,12 @@ |
| 26 | + #include <array> |
| 27 | + #include <bit> // bit_width |
| 28 | + #include <charconv> // __detail::__from_chars_alnum_to_val_table |
| 29 | ++#include <string_view> |
| 30 | + #include <cstdint> |
| 31 | + #include <bits/stl_algo.h> |
| 32 | + #include <bits/stl_iterator.h> |
| 33 | +-#include <bits/ranges_base.h> |
| 34 | ++#include <bits/ranges_base.h> // iterator_t, sentinel_t, input_range, etc. |
| 35 | ++#include <bits/ranges_util.h> // view_interface |
| 36 | + |
| 37 | + namespace std _GLIBCXX_VISIBILITY(default) |
| 38 | + { |
| 39 | +@@ -802,7 +804,7 @@ inline namespace __v15_1_0 |
| 40 | + operator++(int) |
| 41 | + { |
| 42 | + auto __tmp = *this; |
| 43 | +- ++this; |
| 44 | ++ ++*this; |
| 45 | + return __tmp; |
| 46 | + } |
| 47 | + |
0 commit comments