tst_ContainerApiSymmetry: add non-deprecated copy assignment to Movable

Despite the name, this class is copyable, as evidenced by the fact it
has a copy constructor. But that copy constructor causes the implicitly-
declared copy-assignment operator to be deprecated.

warning: implicitly-declared ‘constexpr Movable& Movable::operator=(const Movable&)’ is deprecated [-Wdeprecated-copy]
tst_containerapisymmetry.cpp:55:5: note: because ‘Movable’ has user-provided ‘Movable::Movable(const Movable&)’

Amends 2e1763d83a1dacfc5b747934fb77fa7cec7bfe47 (5.14).

Pick-to: 6.9 6.8 6.5
Change-Id: Ie661f7361a8d86648b21fffdaf9e7d076f86ebe9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 54069d37efa047de5ad7bdf1580720de61b9acd2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Thiago Macieira 2025-06-12 06:53:22 -07:00 committed by Qt Cherry-pick Bot
parent a997b85d63
commit 8bb365b0c5

View File

@ -58,6 +58,8 @@ struct Movable
++instanceCount;
}
Movable &operator=(const Movable &m) = default;
~Movable()
{
--instanceCount;