From 0595aba0d0c52cc79a8b53df39026acdfe09678b Mon Sep 17 00:00:00 2001 From: Sergey Kopienko Date: Mon, 21 Sep 2026 14:19:38 +0200 Subject: [PATCH] test/support/utils.h - fix compile error C2580: 'TestUtils::ConstCopyOnlyCompare::ConstCopyOnlyCompare(const TestUtils::ConstCopyOnlyCompare &)': multiple versions of a defaulted special member functions are not allowed --- test/support/utils.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/support/utils.h b/test/support/utils.h index fec5c70c0cc..6d677eccdeb 100644 --- a/test/support/utils.h +++ b/test/support/utils.h @@ -1515,10 +1515,14 @@ struct ConstCopyOnlyCompare std::int32_t val; ConstCopyOnlyCompare() : val(0) {} ConstCopyOnlyCompare(std::int32_t val_) : val(val_) {} - ConstCopyOnlyCompare(const ConstCopyOnlyCompare&) = default; + ConstCopyOnlyCompare(const ConstCopyOnlyCompare& other) noexcept : val(other.val) {} ConstCopyOnlyCompare(ConstCopyOnlyCompare&) = delete; ConstCopyOnlyCompare& - operator=(const ConstCopyOnlyCompare&) = default; + operator=(const ConstCopyOnlyCompare& other) noexcept + { + val = other.val; + return *this; + } ConstCopyOnlyCompare& operator=(ConstCopyOnlyCompare&) = delete; bool