Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions icu4c/source/common/unicode/utfiterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
#if U_SHOW_CPLUSPLUS_API || U_SHOW_CPLUSPLUS_HEADER_API || !defined(UTYPES_H)

#include <iterator>
#if __has_include(<version>)
#include <version>
#endif
#if defined(__cpp_lib_ranges)
#include <ranges>
#endif
Expand Down Expand Up @@ -1749,6 +1752,9 @@ auto utfIterator(UnitIter p) {
* @see utfStringCodePoints
*/
template<typename CP32, UTFIllFormedBehavior behavior, typename Range>
#if defined(__cpp_lib_ranges)
requires std::ranges::range<Range>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
requires std::ranges::range<Range>
requires std::ranges::range<Range>

#endif
class UTFStringCodePoints {
static_assert(sizeof(CP32) == 4, "CP32 must be a 32-bit type to hold a code point");
public:
Expand Down Expand Up @@ -2467,6 +2473,9 @@ auto unsafeUTFIterator(UnitIter iter) {
* @see unsafeUTFStringCodePoints
*/
template<typename CP32, typename Range>
#if defined(__cpp_lib_ranges)
requires std::ranges::range<Range>
#endif
class UnsafeUTFStringCodePoints {
static_assert(sizeof(CP32) == 4, "CP32 must be a 32-bit type to hold a code point");
public:
Expand Down