为 utf8_to_utf32_iterator 添加转换函数

This commit is contained in:
keqingmoe 2025-03-12 13:26:00 +08:00
parent 1534128144
commit 9b54e8763b

View File

@ -203,6 +203,13 @@ public:
{
return iter_;
}
template <typename To>
requires std::convertible_to<Iter, To>
operator utf8_to_utf32_iterator<To>(this auto&& self)
{
return utf8_to_utf32_iterator<To>{static_cast<To>(std::forward_like<decltype(self)>(self.iter_))};
}
};
template <typename T, typename U>