mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-06 14:05:32 +00:00
ICU-23004 string_view cp iterator must use pointer
This commit is contained in:
parent
4728eac0b7
commit
d2d17f2dc9
1 changed files with 10 additions and 8 deletions
|
@ -1324,13 +1324,15 @@ public:
|
|||
UTFStringCodePoints &operator=(const UTFStringCodePoints &other) = default;
|
||||
|
||||
/** @draft ICU 78 */
|
||||
UTFIterator<CP32, behavior, typename std::basic_string_view<Unit>::iterator> begin() const {
|
||||
return {s.begin(), s.begin(), s.end()};
|
||||
auto begin() const {
|
||||
const Unit *limit = s.data() + s.length();
|
||||
return UTFIterator<CP32, behavior, const Unit *>(s.data(), s.data(), limit);
|
||||
}
|
||||
|
||||
/** @draft ICU 78 */
|
||||
UTFIterator<CP32, behavior, typename std::basic_string_view<Unit>::iterator> end() const {
|
||||
return {s.begin(), s.end(), s.end()};
|
||||
auto end() const {
|
||||
const Unit *limit = s.data() + s.length();
|
||||
return UTFIterator<CP32, behavior, const Unit *>(s.data(), limit, limit);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1866,13 +1868,13 @@ public:
|
|||
UnsafeUTFStringCodePoints &operator=(const UnsafeUTFStringCodePoints &other) = default;
|
||||
|
||||
/** @draft ICU 78 */
|
||||
UnsafeUTFIterator<CP32, typename std::basic_string_view<Unit>::iterator> begin() const {
|
||||
return {s.begin()};
|
||||
auto begin() const {
|
||||
return UnsafeUTFIterator<CP32, const Unit *>(s.data());
|
||||
}
|
||||
|
||||
/** @draft ICU 78 */
|
||||
UnsafeUTFIterator<CP32, typename std::basic_string_view<Unit>::iterator> end() const {
|
||||
return {s.end()};
|
||||
auto end() const {
|
||||
return UnsafeUTFIterator<CP32, const Unit *>(s.data() + s.length());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue