qt6-bb10/tests/auto/corelib
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
..
animation Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
global QTypeInfo: remove further usages of isPointer / isIntegral 2022-12-30 01:51:27 +01:00
io Give tst_QStorageInfo a QCOMPARE_op() makeover 2023-01-13 15:08:25 +01:00
itemmodels Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
kernel QPermission: replace T data<T>() with std::optional<T> value<T>() 2023-01-13 21:07:18 +01:00
mimetypes QFileInfo: use currentDateTimeUtc() 2023-01-06 17:57:52 +00:00
platform CMake: Remove direct qt_android_generate_deployment_settings call 2022-12-15 20:23:28 +01:00
plugin QUuid: add the ability to specify the byte order for 128-bit IDs 2022-12-16 19:29:10 +01:00
serialization QXmlStreamWriter: fix a thinko in doWriteToDevice(QSV) 2022-12-16 22:58:11 +01:00
text Add QString<->emscripten::val conversion functions 2023-01-13 21:07:14 +01:00
thread QPromise: improve documentation snippet 2023-01-09 10:03:48 +01:00
time Fix RTA test build for INTEGRITY 2023-01-09 11:47:37 +01:00
tools QVarLengthArray: cope with vector<unique_ptr>'s copyability 2023-01-16 22:44:13 +01:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00