diff --git a/src/regex_impl.hh b/src/regex_impl.hh index 5a294400..3addb2b2 100644 --- a/src/regex_impl.hh +++ b/src/regex_impl.hh @@ -85,18 +85,6 @@ enum class RegexExecFlags constexpr bool with_bit_ops(Meta::Type) { return true; } -template -struct ChooseUtf8It -{ - using Type = utf8::iterator; -}; - -template -struct ChooseUtf8It -{ - using Type = std::reverse_iterator>; -}; - template class ThreadedRegexVM { @@ -217,7 +205,9 @@ private: Saves* saves; }; - using Utf8It = typename ChooseUtf8It::Type; + using Utf8It = std::conditional_t, + std::reverse_iterator>>; enum class StepResult { Consumed, Matched, Failed };