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.10 6.9 6.8 6.5
Change-Id: Ie661f7361a8d86648b21fffdaf9e7d076f86ebe9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
Thiago Macieira 2025-06-12 06:53:22 -07:00
parent 1141a6fa17
commit 54069d37ef

View File

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