summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qanystringview.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/text/qanystringview.h')
-rw-r--r--src/corelib/text/qanystringview.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/corelib/text/qanystringview.h b/src/corelib/text/qanystringview.h
index b7f3650275f..01efd83743d 100644
--- a/src/corelib/text/qanystringview.h
+++ b/src/corelib/text/qanystringview.h
@@ -102,12 +102,7 @@ private:
static constexpr bool isAsciiOnlyCharsAtCompileTime(Char *str, qsizetype sz) noexcept
{
// do not perform check if not at compile time
-#if !defined(QT_SUPPORTS_IS_CONSTANT_EVALUATED)
- Q_UNUSED(str);
- Q_UNUSED(sz);
- return false;
-#else
- if (!qIsConstantEvaluated())
+ if (!q20::is_constant_evaluated())
return false;
if constexpr (sizeof(Char) != sizeof(char)) {
Q_UNUSED(str);
@@ -120,7 +115,6 @@ private:
}
return true;
}
-#endif
}
template<typename Char>
@@ -138,10 +132,8 @@ private:
template <typename Char>
static constexpr qsizetype lengthHelperPointer(const Char *str) noexcept
{
-#ifdef QT_SUPPORTS_IS_CONSTANT_EVALUATED
- if (qIsConstantEvaluated())
+ if (q20::is_constant_evaluated())
return qsizetype(std::char_traits<Char>::length(str));
-#endif
if constexpr (sizeof(Char) == sizeof(char16_t))
return QtPrivate::qustrlen(reinterpret_cast<const char16_t*>(str));
else