qt5base-lts/tests/auto/corelib/tools
Thiago Macieira 878b2047b5 QList::iterator: use templates for advancing operators
Because of the addition of the operator T*(), the expression "it + N"
where N was not exactly qsizetype but any other integer type was a
compilation failure because of ambiguous overload resolution.

With GCC it's apparently a warning:

 warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
 note: candidate 1: ‘QList<T>::iterator QList<T>::iterator::operator+(qsizetype) const [with T = char; qsizetype = long long int]’
 note: candidate 2: ‘operator+(char*, ptrdiff_t {aka long int})’ (built-in)

With Clang, it's an error:

 error: use of overloaded operator '+' is ambiguous (with operand types 'QList<int>::const_iterator' and 'ptrdiff_t' (aka 'long'))
 note: candidate function
        inline const_iterator operator+(qsizetype j) const { return const_iterator(i+j); }
 note: built-in candidate operator+(const int *, long)

Pick-to: 6.2
Fixes: QTBUG-96128
Change-Id: Ie72b0dd0fbe84d2caae0fffd16a06f23dd56b060
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-10-12 08:46:31 -07:00
..
collections Fix compilation for recursive Qt containers 2021-09-07 15:48:35 +02:00
containerapisymmetry Fix gcc warnings from having only one of assignment/copy 2021-04-11 19:53:51 +02:00
qalgorithms Remove the qmake project files 2021-01-07 15:32:28 +01:00
qarraydata QArrayData: store the right flag type, not an int 2021-05-17 00:11:12 +02:00
qbitarray Remove the qmake project files 2021-01-07 15:32:28 +01:00
qcache Fix gcc warnings from having only one of assignment/copy 2021-04-11 19:53:51 +02:00
qcommandlineparser Compile autotests for Integrity 2021-09-20 17:29:04 +03:00
qcontiguouscache Remove the qmake project files 2021-01-07 15:32:28 +01:00
qcryptographichash Remove conditioning on Android embedded 2021-09-17 17:30:14 +02:00
qduplicatetracker QDuplicateTracker: bring back appendTo() && 2021-07-27 17:44:30 +02:00
qeasingcurve Remove the qmake project files 2021-01-07 15:32:28 +01:00
qexplicitlyshareddatapointer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qflatmap Remove the qmake project files 2021-01-07 15:32:28 +01:00
qfreelist CMake: Remove the usage of QT_SOURCE_TREE from tests 2021-07-12 18:56:14 +02:00
qhash QHash/QSet: fix squeeze() for default-constructed container 2021-07-27 20:57:49 +02:00
qhashfunctions QHash: fix qHash(std::pair) 2021-05-23 12:08:43 -07:00
qhashseed Compile autotests for Integrity 2021-09-20 17:29:04 +03:00
qline Remove the qmake project files 2021-01-07 15:32:28 +01:00
qlist QList::iterator: use templates for advancing operators 2021-10-12 08:46:31 -07:00
qmacautoreleasepool Remove the qmake project files 2021-01-07 15:32:28 +01:00
qmakearray Remove the qmake project files 2021-01-07 15:32:28 +01:00
qmap QMap: add operator+ and - for iterators 2021-07-27 23:48:29 +02:00
qmargins Remove the qmake project files 2021-01-07 15:32:28 +01:00
qmessageauthenticationcode Remove the qmake project files 2021-01-07 15:32:28 +01:00
qoffsetstringarray QOffsetStringArray: rewrite in modern C++17 2021-10-11 19:00:52 -07:00
qpair Remove the qmake project files 2021-01-07 15:32:28 +01:00
qpoint Remove the qmake project files 2021-01-07 15:32:28 +01:00
qpointf Remove the qmake project files 2021-01-07 15:32:28 +01:00
qqueue Remove the qmake project files 2021-01-07 15:32:28 +01:00
qrect Remove the qmake project files 2021-01-07 15:32:28 +01:00
qringbuffer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qscopedpointer Disable warnings from using deprecated QScopedPointer::take 2021-02-13 06:44:52 +01:00
qscopedvaluerollback Remove the qmake project files 2021-01-07 15:32:28 +01:00
qscopeguard Remove checks for features available in C++17 2021-10-02 17:54:39 +02:00
qset Remove checks for features available in C++17 2021-10-02 17:54:39 +02:00
qsharedpointer Compile autotests for Integrity 2021-09-20 17:29:04 +03:00
qsize Add more support for structured bindings 2021-02-25 16:08:44 +01:00
qsizef Add more support for structured bindings 2021-02-25 16:08:44 +01:00
qstl Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtaggedpointer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtimeline Port of QTimeLine to new property system 2021-04-26 16:44:54 +02:00
qvarlengtharray Remove checks for features available in C++17 2021-10-02 17:54:39 +02:00
qversionnumber Remove the qmake project files 2021-01-07 15:32:28 +01:00
CMakeLists.txt Compile autotests for Integrity 2021-09-20 17:29:04 +03:00