|
|
|
@ -58,13 +58,13 @@ class TestFactory4 : public TestFactory3 {
@@ -58,13 +58,13 @@ class TestFactory4 : public TestFactory3 {
|
|
|
|
|
public: |
|
|
|
|
TestFactory4() : TestFactory3() { print_default_created(this); } |
|
|
|
|
TestFactory4(int v) : TestFactory3(v) { print_created(this, v); } |
|
|
|
|
virtual ~TestFactory4() { print_destroyed(this); } |
|
|
|
|
~TestFactory4() override { print_destroyed(this); } |
|
|
|
|
}; |
|
|
|
|
// Another class for an invalid downcast test
|
|
|
|
|
class TestFactory5 : public TestFactory3 { |
|
|
|
|
public: |
|
|
|
|
TestFactory5(int i) : TestFactory3(i) { print_created(this, i); } |
|
|
|
|
virtual ~TestFactory5() { print_destroyed(this); } |
|
|
|
|
~TestFactory5() override { print_destroyed(this); } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
class TestFactory6 { |
|
|
|
@ -88,8 +88,8 @@ public:
@@ -88,8 +88,8 @@ public:
|
|
|
|
|
PyTF6(PyTF6 &&f) : TestFactory6(std::move(f)) { print_move_created(this); } |
|
|
|
|
PyTF6(const PyTF6 &f) : TestFactory6(f) { print_copy_created(this); } |
|
|
|
|
PyTF6(std::string s) : TestFactory6((int) s.size()) { alias = true; print_created(this, s); } |
|
|
|
|
virtual ~PyTF6() { print_destroyed(this); } |
|
|
|
|
int get() override { PYBIND11_OVERRIDE(int, TestFactory6, get, /*no args*/); } |
|
|
|
|
~PyTF6() override { print_destroyed(this); } |
|
|
|
|
int get() override { PYBIND11_OVERLOAD(int, TestFactory6, get, /*no args*/); } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
class TestFactory7 { |
|
|
|
@ -109,8 +109,7 @@ public:
@@ -109,8 +109,7 @@ public:
|
|
|
|
|
PyTF7(int i) : TestFactory7(i) { alias = true; print_created(this, i); } |
|
|
|
|
PyTF7(PyTF7 &&f) : TestFactory7(std::move(f)) { print_move_created(this); } |
|
|
|
|
PyTF7(const PyTF7 &f) : TestFactory7(f) { print_copy_created(this); } |
|
|
|
|
virtual ~PyTF7() { print_destroyed(this); } |
|
|
|
|
int get() override { PYBIND11_OVERRIDE(int, TestFactory7, get, /*no args*/); } |
|
|
|
|
~PyTF7() override { print_destroyed(this); } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|