summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qanystringview.h
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2024-02-27 14:28:32 +0100
committerIvan Solovev <ivan.solovev@qt.io>2024-03-01 16:01:45 +0100
commit380c01bac545172624944e269214ba168e59fb3c (patch)
treef1a36c46dc50173f282d3d5a1cb00fe7ae817d80 /src/corelib/text/qanystringview.h
parent60aeeb0e92762d57c208e4212374d30be6490611 (diff)
Bring back QASV::detects_US_ASCII_at_compile_time
Even though undocumented, it's public API, doesn't hurt to carry along, and improves compiler coverage in the test, so let's not remove it. Found in 6.7 API review Amends 95e6fac0a5a1eee3aa23e4da0a93c6c25e32fb98. Pick-to: 6.7 Change-Id: Ia935036a69e0e678f22ac86b48a2c1c5e8c46733 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/corelib/text/qanystringview.h')
-rw-r--r--src/corelib/text/qanystringview.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/text/qanystringview.h b/src/corelib/text/qanystringview.h
index 1e61979af8..d74d371e2d 100644
--- a/src/corelib/text/qanystringview.h
+++ b/src/corelib/text/qanystringview.h
@@ -275,6 +275,14 @@ public:
[[nodiscard]] Q_CORE_EXPORT static int compare(QAnyStringView lhs, QAnyStringView rhs, Qt::CaseSensitivity cs = Qt::CaseSensitive) noexcept;
[[nodiscard]] Q_CORE_EXPORT static bool equal(QAnyStringView lhs, QAnyStringView rhs) noexcept;
+ static constexpr inline bool detects_US_ASCII_at_compile_time =
+#ifdef QT_SUPPORTS_IS_CONSTANT_EVALUATED
+ true
+#else
+ false
+#endif
+ ;
+
//
// STL compatibility API:
//