qt6-bb10/tests/auto/corelib/tools
Marc Mutz 800ebd84f5 QVarLengthArray: cope with vector<unique_ptr>'s copyability
Despite being move-only, std::vector<unique_ptr> advertizes
is_copyable:
  https://quuxplusone.github.io/blog/2020/02/05/vector-is-copyable-except-when-its-not/

Our combined reallocation and resizing function, reallocate_impl(),
runs afoul of this when it uses std::is_copyable in a constexpr-if to
implement resize(n, v) without running into problems with move-only
types: the trait is true, but actual instantation runs into a
static_assert in the STL implementation.

To fix, move the problematic resize functionality out of
reallocate_impl() and into the resp. resize_impl overloads. The shrink
functionality remains in reallocate_impl(), because there are many
more users, and it only requires destructible<T>, which isn't
constraining at all.

Amends a00a1d8806.

Fixes: QTBUG-109745
Pick-to: 6.5 6.4
Change-Id: Ibc5b9cf5375108eb3d8f6c8a16d4fd02dadd73b1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-01-16 22:44:13 +01:00
..
collections QTypeInfo: remove further usages of isPointer / isIntegral 2022-12-30 01:51:27 +01:00
containerapisymmetry ContainerApiSymmetry: verify Qt containers member erase returns iterator 2022-12-02 21:53:02 +02:00
qalgorithms tst_QAlgorithms: don't use random numbers in the test row names 2023-01-11 11:16:20 -08:00
qarraydata Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qatomicscopedvaluerollback Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qbitarray Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qcache Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qcommandlineparser Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qcontiguouscache Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qcryptographichash tst_QCryptographicHash: avoid duplicate data tags 2022-10-18 14:13:26 +02:00
qduplicatetracker Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qeasingcurve Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qexplicitlyshareddatapointer Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qflatmap Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qfreelist Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qhash Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qhashfunctions QHash: tame HasQHashSingleArgOverload ODR violations 2022-11-01 01:52:13 +02:00
qhashseed Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qline Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qlist Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qmacautoreleasepool Move QMacAutoReleasePool from qglobal.h to qcore_mac_p.h 2022-09-01 13:26:30 +02:00
qmakearray Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qmap tst_QMap: remove unused std::as_const clone 2022-11-18 18:02:21 +01:00
qmargins Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qmessageauthenticationcode Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qoffsetstringarray QOffsetStringArray: add contains() method 2022-12-09 06:22:06 +00:00
qpair QTypeInfo: remove further usages of isPointer / isIntegral 2022-12-30 01:51:27 +01:00
qpoint Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qpointf Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qqueue Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qrect tst_QRect::containsPointF_data(): remove duplicate data row 2022-10-18 14:13:27 +02:00
qringbuffer Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qscopedpointer tst_qscopedpointer: port away from deprecated APIs 2022-08-27 02:07:54 +02:00
qscopedvaluerollback Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qscopeguard Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qset tst_QSet: fix flakiness after we removed the fixed, non-zero seed 2022-10-18 14:15:51 +00:00
qsharedpointer Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qsize Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qsizef Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qstl Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qtaggedpointer QTaggedPointer: disable operator= with an empty initializer list 2022-09-29 16:18:55 +02:00
qtimeline Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qvarlengtharray QVarLengthArray: cope with vector<unique_ptr>'s copyability 2023-01-16 22:44:13 +01:00
qversionnumber Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00