| 85 | }; |
| 86 | |
| 87 | class TestFactory6 { |
| 88 | protected: |
| 89 | int value; |
| 90 | bool alias = false; |
| 91 | |
| 92 | public: |
| 93 | explicit TestFactory6(int i) : value{i} { print_created(this, i); } |
| 94 | TestFactory6(TestFactory6 &&f) noexcept { |
| 95 | print_move_created(this); |
| 96 | // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer) |
| 97 | value = f.value; |
| 98 | // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer) |
| 99 | alias = f.alias; |
| 100 | } |
| 101 | TestFactory6(const TestFactory6 &f) { |
| 102 | print_copy_created(this); |
| 103 | // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer) |
| 104 | value = f.value; |
| 105 | // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer) |
| 106 | alias = f.alias; |
| 107 | } |
| 108 | virtual ~TestFactory6() { print_destroyed(this); } |
| 109 | virtual int get() { return value; } |
| 110 | bool has_alias() const { return alias; } |
| 111 | }; |
| 112 | class PyTF6 : public TestFactory6 { |
| 113 | public: |
| 114 | // Special constructor that allows the factory to construct a PyTF6 from a TestFactory6 only |
no outgoing calls