We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c124b35 commit 92a1e1fCopy full SHA for 92a1e1f
tests/test_class_sh_shared_ptr_copy_move.cpp
@@ -15,8 +15,16 @@ template <int SerNo>
15
struct Foo {
16
std::string history;
17
Foo(const std::string &history_) : history(history_) {}
18
- Foo(const Foo &other) = delete;
19
- Foo(Foo &&other) = delete;
+ Foo(const Foo &other) : history(other.history + "_CpCtor") {}
+ Foo(Foo &&other) : history(other.history + "_MvCtor") {}
20
+ Foo &operator=(const Foo &other) {
21
+ history = other.history + "_OpEqLv";
22
+ return *this;
23
+ }
24
+ Foo &operator=(Foo &&other) {
25
+ history = other.history + "_OpEqRv";
26
27
28
std::string get_history() const { return "Foo" + fooNames[SerNo] + history; }
29
};
30
0 commit comments