From 4d10fb549416791393adcf06bd19684123665b0d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 18 Jul 2020 10:35:25 +0200 Subject: Implement Array move operators by hand I'm not sure why Apple clang has a problem with this, but clang-tidy (rightly) warns about move operators that aren't noexcept, so just define them manually. --- raul/Array.hpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'raul/Array.hpp') diff --git a/raul/Array.hpp b/raul/Array.hpp index cac993d..ee50470 100644 --- a/raul/Array.hpp +++ b/raul/Array.hpp @@ -79,9 +79,18 @@ public: } } - Array(Array&& array) = default; + Array(Array&& array) noexcept + : _size(array._size) + , _elems(std::move(array._elems)) + { + } - Array& operator=(Array&&) = default; + Array& operator=(Array&& array) noexcept + { + _size = array._size; + _elems = std::move(array._elems); + return *this; + } Array(size_t size, const Array& contents) : _size(size) -- cgit v1.2.1