Mixed direct/factory construction:
| 52 | }; |
| 53 | // Mixed direct/factory construction: |
| 54 | class TestFactory3 { |
| 55 | protected: |
| 56 | friend class TestFactoryHelper; |
| 57 | TestFactory3() : value("(empty3)") { print_default_created(this); } |
| 58 | explicit TestFactory3(int v) : value(std::to_string(v)) { print_created(this, value); } |
| 59 | |
| 60 | public: |
| 61 | explicit TestFactory3(std::string v) : value(std::move(v)) { print_created(this, value); } |
| 62 | TestFactory3(TestFactory3 &&m) noexcept : value{std::move(m.value)} { |
| 63 | print_move_created(this); |
| 64 | } |
| 65 | TestFactory3 &operator=(TestFactory3 &&m) noexcept { |
| 66 | value = std::move(m.value); |
| 67 | print_move_assigned(this); |
| 68 | return *this; |
| 69 | } |
| 70 | std::string value; |
| 71 | virtual ~TestFactory3() { print_destroyed(this); } |
| 72 | }; |
| 73 | // Inheritance test |
| 74 | class TestFactory4 : public TestFactory3 { |
| 75 | public: |
nothing calls this directly
no test coverage detected