From 4565c8ef79fe83f29995837915e93ad0b8d6747d Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Sat, 2 Apr 2022 10:36:55 +0200 Subject: [PATCH] rvalue Array+= allows for Array({1,2,3})+={4,5} --- libsrc/core/array.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libsrc/core/array.hpp b/libsrc/core/array.hpp index 138d615f..0d01d172 100644 --- a/libsrc/core/array.hpp +++ b/libsrc/core/array.hpp @@ -1353,6 +1353,12 @@ namespace ngcore return array; } + template + inline Array operator+= (Array && array, const BaseArrayObject & a2) + { + array += a2; + return std::move(array); + } /// bubble sort array