diff options
Diffstat (limited to 'libstdc++-v3/include/bits/unicode.h')
-rw-r--r-- | libstdc++-v3/include/bits/unicode.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libstdc++-v3/include/bits/unicode.h b/libstdc++-v3/include/bits/unicode.h index 99d972e..f1b6bf4 100644 --- a/libstdc++-v3/include/bits/unicode.h +++ b/libstdc++-v3/include/bits/unicode.h @@ -151,6 +151,11 @@ namespace __unicode { return _M_curr(); } [[nodiscard]] + constexpr iter_difference_t<_Iter> + _M_units() const requires forward_iterator<_Iter> + { return _M_to_increment; } + + [[nodiscard]] constexpr value_type operator*() const { return _M_buf[_M_buf_index]; } @@ -610,6 +615,18 @@ inline namespace __v16_0_0 } // @pre c <= 0x10FFFF + constexpr bool + __should_escape_category(char32_t __c) noexcept + { + constexpr uint32_t __mask = 0x01; + auto* __end = std::end(__escape_edges); + auto* __p = std::lower_bound(__escape_edges, __end, + (__c << 1u) + 2); + return __p[-1] & __mask; + } + + + // @pre c <= 0x10FFFF constexpr _Gcb_property __grapheme_cluster_break_property(char32_t __c) noexcept { |