qt5base-lts/tests/auto/corelib/tools/qarraydata
Lars Knoll 621c05e3b1 Don't allow storing types that throw in the destructor in our containers
Types that throw in their destructors are strongly discouraged in C++,
and even the STL doesn't define what happens if such types are stored
in their containers.

Make this more explicit for Qt and disallow storing those types in our
containers. This will hopefully preempty any potential future bug
reports about us not handling such a case. It also helps simplify
some code in QList and other cases and makes it possible to explicitly
mark more methods as noexcept.

Some care needs to be taken where to add the static asserts, so that
we don't disallow forward declarations of types stored in containers.
Place the static assert into the destructor of the container where
possible or otherwise into the templated d-pointer.

Change-Id: If3aa40888f668d0f1b6c6b3ad4862b169d31280e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-11-17 11:46:28 +01:00
..
CMakeLists.txt CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
qarraydata.pro Separate exception safety primitives from operations 2020-08-18 12:55:38 +02:00
simplevector.h Simplify the code for QList::emplace() 2020-11-17 11:45:52 +01:00
tst_qarraydata.cpp Don't allow storing types that throw in the destructor in our containers 2020-11-17 11:46:28 +01:00