gcc13 fix

Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
Viktor Govako
2025-07-28 12:12:54 -03:00
committed by Konstantin Pastbin
parent 52a0c45083
commit b1c2b204a1

View File

@@ -152,11 +152,17 @@ inline std::string DebugPrint(UniString const & s)
class TokenizeIteratorBase
{
template <typename...>
static constexpr bool is_utf8cpp_iterator = false;
template <typename T>
struct is_utf8cpp_iterator
{
static bool constexpr value = false;
};
template <typename... Args>
static constexpr bool is_utf8cpp_iterator<utf8::unchecked::iterator<Args...>> = true;
template <typename T>
struct is_utf8cpp_iterator<utf8::unchecked::iterator<T>>
{
static bool constexpr value = true;
};
public:
using difference_type = std::ptrdiff_t;
@@ -165,7 +171,7 @@ public:
template <class T>
static std::string_view ToStringView(T first, T last)
{
if constexpr (is_utf8cpp_iterator<T>)
if constexpr (is_utf8cpp_iterator<T>::value)
return TokenizeIteratorBase::ToStringView(first.base(), last.base());
else
return std::string_view(first, last);