diff options
author | Marc Mutz <marc.mutz@qt.io> | 2023-09-08 17:17:17 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2023-09-12 23:12:13 +0200 |
commit | 5503b478935aee563d31c5df035803818f4cead3 (patch) | |
tree | 9d43f782c0f14e276b03d5f1695d05935ced327f /src/corelib/text/qbytearray.h | |
parent | QBA::replace: avoid unconditional detach (diff) | |
download | qtbase-5503b478935aee563d31c5df035803818f4cead3.tar.xz qtbase-5503b478935aee563d31c5df035803818f4cead3.zip |
Qt UDLs: avoid the deprecated form of UDL definitions
cppreference.com says¹ that the space after the "" is deprecated now,
so remove the space. Let's just hope all our compilers support this,
otherwise it will get ugly².
¹ https://en.cppreference.com/w/cpp/language/user_literal#Literal_operators
² https://github.com/yhirose/cpp-httplib/issues/953
Pick-to: 6.6 6.5 6.2
Change-Id: Ic8e4939e3ba713023c5a5c020305c96b521dbda9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/text/qbytearray.h')
-rw-r--r-- | src/corelib/text/qbytearray.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/text/qbytearray.h b/src/corelib/text/qbytearray.h index 972e2174d3..3b99ef78b2 100644 --- a/src/corelib/text/qbytearray.h +++ b/src/corelib/text/qbytearray.h @@ -715,7 +715,7 @@ namespace Qt { inline namespace Literals { inline namespace StringLiterals { -inline QByteArray operator"" _ba(const char *str, size_t size) noexcept +inline QByteArray operator""_ba(const char *str, size_t size) noexcept { return QByteArray(QByteArrayData(nullptr, const_cast<char *>(str), qsizetype(size))); } @@ -728,7 +728,7 @@ inline namespace QtLiterals { #if QT_DEPRECATED_SINCE(6, 8) QT_DEPRECATED_VERSION_X_6_8("Use _ba from Qt::StringLiterals namespace instead.") -inline QByteArray operator"" _qba(const char *str, size_t size) noexcept +inline QByteArray operator""_qba(const char *str, size_t size) noexcept { return Qt::StringLiterals::operator""_ba(str, size); } |