summaryrefslogtreecommitdiff
path: root/tests/run/cpp_locals_directive.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/cpp_locals_directive.pyx')
-rw-r--r--tests/run/cpp_locals_directive.pyx10
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/run/cpp_locals_directive.pyx b/tests/run/cpp_locals_directive.pyx
index 6c9c89ba5..359ae0b10 100644
--- a/tests/run/cpp_locals_directive.pyx
+++ b/tests/run/cpp_locals_directive.pyx
@@ -19,13 +19,9 @@ cdef extern from *:
C(C&& rhs) : x(rhs.x), print_destructor(rhs.print_destructor) {
rhs.print_destructor = false; // moved-from instances are deleted silently
}
- C& operator=(C&& rhs) {
- x=rhs.x;
- print_destructor=rhs.print_destructor;
- rhs.print_destructor = false; // moved-from instances are deleted silently
- return *this;
- }
- C(const C& rhs) = default;
+ // also test that we don't require the assignment operator
+ C& operator=(C&& rhs) = delete;
+ C(const C& rhs) = delete;
C& operator=(const C& rhs) = default;
~C() {
if (print_destructor) print_C_destructor();