Skip to content

Commit b000987

Browse files
committed
Fix broken CI
clang 3.x requires declaration of default copy constructors, due to use of std::is_copy_constructible.
1 parent aa7d99e commit b000987

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

tests/test_class.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ TEST_SUBMODULE(class_, m) {
421421
// test_exception_rvalue_abort
422422
struct PyPrintDestructor {
423423
PyPrintDestructor() = default;
424+
PyPrintDestructor(const PyPrintDestructor&) = default;
424425
~PyPrintDestructor() {
425426
py::print("Print from destructor");
426427
}

tests/test_numpy_array.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ TEST_SUBMODULE(numpy_array, sm) {
206206
struct ArrayClass {
207207
int data[2] = { 1, 2 };
208208
ArrayClass() { py::print("ArrayClass()"); }
209+
ArrayClass(const ArrayClass&) = default;
209210
~ArrayClass() { py::print("~ArrayClass()"); }
210211
};
211212
py::class_<ArrayClass>(sm, "ArrayClass")

tests/test_smart_ptr.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ class MyObject4b : public MyObject4a {
161161
class MyObject5 { // managed by huge_unique_ptr
162162
public:
163163
MyObject5(int value) : value{value} { print_created(this); }
164+
MyObject5(const MyObject5&) = default;
164165
~MyObject5() { print_destroyed(this); }
165166
int value;
166167
};
@@ -220,6 +221,7 @@ struct TypeForHolderWithAddressOf {
220221
// test_move_only_holder_with_addressof_operator
221222
struct TypeForMoveOnlyHolderWithAddressOf {
222223
TypeForMoveOnlyHolderWithAddressOf(int value) : value{value} { print_created(this); }
224+
TypeForMoveOnlyHolderWithAddressOf(const TypeForMoveOnlyHolderWithAddressOf&) = default;
223225
~TypeForMoveOnlyHolderWithAddressOf() { print_destroyed(this); }
224226
std::string toString() const {
225227
return "MoveOnlyHolderWithAddressOf[" + std::to_string(value) + "]";

0 commit comments

Comments
 (0)