qt5base-lts/tests/auto/corelib
Marc Mutz e0ea0f6178 QChar: optimize comparison with QString{,Ref}
Instead of relying on the QString relational operators to
implicitly convert the QChar to a QString, add relational
operator overloads that compare the QChar without first
turning it into a QString, saving one memory allocation
per comparison, and allowing to mark the operation as
nothrow.

Consequently, in tst_QStringBinOps, verify now that all
relational operations are noexcept.

The added overloads make QChar ==/!= int comparisons
ambiguous. De-ambiguate by providing a constrained
template that matches int and nothing but int (otherwise,
the QChar and the int versions would compete for a
QChar::SpecialCharacter argument, and end up creating
new ambiguities). This solution may not be perfect, but
it can be easily extended should more ambiguities crop up.
The existing overload deals with all patterns found in
qtbase.

Change-Id: I4156d918e9b9134c1da684b8b69e0ee526ad24e3
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-05 19:47:37 +00:00
..
animation QtCore: Remove Windows CE. 2016-03-30 11:22:47 +00:00
codecs QtCore: Remove Windows CE. 2016-03-30 11:22:47 +00:00
global Merge remote-tracking branch 'origin/5.7' into dev 2016-04-05 14:22:45 +02:00
io Merge remote-tracking branch 'origin/5.7' into dev 2016-04-05 14:22:45 +02:00
itemmodels QtCore: Remove Windows CE. 2016-03-30 11:22:47 +00:00
json Update testdata 2016-02-17 04:50:50 +00:00
kernel Merge remote-tracking branch 'origin/5.7' into dev 2016-04-05 14:22:45 +02:00
mimetypes Updated license headers 2016-01-21 18:55:18 +00:00
plugin QtCore: Remove Windows CE. 2016-03-30 11:22:47 +00:00
statemachine Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev 2016-01-26 11:27:37 +00:00
thread Merge remote-tracking branch 'origin/5.7' into dev 2016-04-05 14:22:45 +02:00
tools QChar: optimize comparison with QString{,Ref} 2016-04-05 19:47:37 +00:00
xml Merge remote-tracking branch 'origin/5.6' into 5.7 2016-03-21 09:02:57 +01:00
corelib.pro iOS: Enable building of basic tests 2014-01-22 12:35:17 +01:00