From f06f0927b3a11759472ba9a9f18f6a32e516ac37 Mon Sep 17 00:00:00 2001 From: Jakob Lykke Andersen Date: Thu, 24 Jun 2021 14:13:28 +0200 Subject: [PATCH] SH, history tracking --- tests/test_class_sh_shared_ptr_copy_move.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/test_class_sh_shared_ptr_copy_move.cpp b/tests/test_class_sh_shared_ptr_copy_move.cpp index 7e1239651..69172efbf 100644 --- a/tests/test_class_sh_shared_ptr_copy_move.cpp +++ b/tests/test_class_sh_shared_ptr_copy_move.cpp @@ -15,8 +15,16 @@ template struct Foo { std::string history; Foo(const std::string &history_) : history(history_) {} - Foo(const Foo &other) = delete; - Foo(Foo &&other) = delete; + Foo(const Foo &other) : history(other.history + "_CpCtor") {} + Foo(Foo &&other) : history(other.history + "_MvCtor") {} + Foo &operator=(const Foo &other) { + history = other.history + "_OpEqLv"; + return *this; + } + Foo &operator=(Foo &&other) { + history = other.history + "_OpEqRv"; + return *this; + } std::string get_history() const { return "Foo" + fooNames[SerNo] + history; } };