qt5base-lts/tests/auto/corelib/tools
Marc Mutz eb9c8042cf Short live QT_ENABLE_P0846_SEMANTICS_FOR!
In C++17, unqualified lookup doesn't find function templates that
require ADL from a call with explicit template arguments, unless
another function template of that name is in scope (otherwise, the <
is parsed as operator less-than instead).

P0846, merged for C++20, fixes this to repeat the name lookup, parsing
the < as indicating a template.

We have API in Qt (Tuple Protocol for some types, e.g. QPoint) that
work for the purpose of Structured Bindings, but don't work for manual
unqualified calls when P0846 semantics are missing, and we're adding
more, to QVariant, so add a macro to handle the issue.

The macro simply declares a function template overload of the given
name for a throw-away struct, thereby bringing, for that one name,
P0846 semantics into C++17.

When we require C++20, we can drop this again.

Amends:
- fb6b7869e8 for QPoint(F)
- 8ae9431c79 for QMargins(F)
- 0e22001a3b for the rest

[ChangeLog][QtCore][QSize/F, QMargins/F, QPoint/F] Fixed manual
get<I>() calls (Tuple Protocol) in C++17 mode.

Task-number: QTBUG-111598
Change-Id: I2ffaef12c5bb6d82f75ce78a7c03c6789dfa0691
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2023-03-22 15:59:10 +00:00
..
collections Replace ushort*/uint* with char16_t*/char32_t* in private API [1] 2023-03-15 20:25:57 +00:00
containerapisymmetry tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qalgorithms tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qarraydata tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qatomicscopedvaluerollback Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qbitarray tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qcache tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qcommandlineparser tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qcontiguouscache tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qcryptographichash QCryptographicHash: check addData() with null QByteArrayView 2023-03-17 00:41:33 +01:00
qduplicatetracker tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qeasingcurve tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qexplicitlyshareddatapointer tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qflatmap tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qfreelist Fix tst_qfreelist when build with unity 2023-03-14 17:28:43 +01:00
qhash QHash: fix GrowthPolicy::bucketsForCapacity 2023-02-23 10:36:36 -08:00
qhashfunctions tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qhashseed Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qline tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qlist tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qmacautoreleasepool tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qmakearray tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qmap tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qmargins Short live QT_ENABLE_P0846_SEMANTICS_FOR! 2023-03-22 15:59:10 +00:00
qmessageauthenticationcode tst_QMessageAuthenticationCode: avoid setKey() calls 2023-03-20 14:42:11 +01:00
qoffsetstringarray tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qpair tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qpoint Short live QT_ENABLE_P0846_SEMANTICS_FOR! 2023-03-22 15:59:10 +00:00
qpointf Short live QT_ENABLE_P0846_SEMANTICS_FOR! 2023-03-22 15:59:10 +00:00
qqueue tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qrect tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qringbuffer tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qscopedpointer tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qscopedvaluerollback tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qscopeguard tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qset QHash: fix GrowthPolicy::bucketsForCapacity 2023-02-23 10:36:36 -08:00
qsharedpointer QThread: add sleep(std::chrono::nanoseconds) overload 2023-03-13 23:26:28 +02:00
qsize Short live QT_ENABLE_P0846_SEMANTICS_FOR! 2023-03-22 15:59:10 +00:00
qsizef Short live QT_ENABLE_P0846_SEMANTICS_FOR! 2023-03-22 15:59:10 +00:00
qstl tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qtaggedpointer tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qtimeline tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qvarlengtharray tst_qvarlengtharray: add test for QVLA(n) ctor 2023-03-01 18:14:39 +00:00
qversionnumber tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
CMakeLists.txt Fix tst_qfreelist when build with unity 2023-03-14 17:28:43 +01:00