diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2024-02-15 12:36:39 +0100 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2024-02-20 01:04:33 +0100 |
commit | fb50ab700600cbcdf21e5d06321f357eae4303bb (patch) | |
tree | c2d5a9a25513c554d63c5f1c1bfcd4704136d921 /src/corelib/text/qstringview.h | |
parent | 1f92ff3ee08259d56209191cff24983b5969d50c (diff) |
Add QByteArrayView vs const char * relational operators
... by using the new comparison helper macros.
Also, convert the existing QByteArrayView relational operators to use
these macros.
An attempt to define the helper functions comparesEqual() and
compareThreeWay() as hidden friends leads to compilation errors, because
the QByteArrayView(QLatin1StringView) constructor gets somehow disabled.
Apparently, it cannot satisfy the
QtPrivate::IsContainerCompatibleWithQByteArrayView trait anymore.
I could not find a reason for that, so I just defined the helper
functions as static inline private members of QByteArrayView. This fixes
the issue.
This allows to enable related tests in tst_qstringapisymmetry.
Task-number: QTBUG-108805
Change-Id: I35a69e99db8c61531ec726dab5b242b857f69e85
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/text/qstringview.h')
0 files changed, 0 insertions, 0 deletions