From 91ece536bde89d3e71b1990011af1e77a17af951 Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Sun, 7 Feb 2016 12:01:47 +0100 Subject: [PATCH] provide impl for move-ops in test_async --- test/test_async.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test/test_async.cpp b/test/test_async.cpp index 9ba9e3b0..85eddf3e 100644 --- a/test/test_async.cpp +++ b/test/test_async.cpp @@ -18,10 +18,19 @@ struct A { A() = default; A( A const&) = delete; - A( A &&) = default; - A & operator=( A const&) = delete; - A & operator=( A &&) = default; + + A( A && other) : + value{ other.value } { + other.value = 0; + } + + A & operator=( A && other) { + if ( this == & other) return * this; + value = other.value; + other.value = 0; + return * this; + } int value{ 0 }; };