From e6959055b56bb33a7b8f42961d45b24d4c697cf1 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Fri, 5 Feb 2021 22:42:56 +0000 Subject: [PATCH] core(cuda.hpp): fix GpuMatND compilation with GCC < 5 --- modules/core/include/opencv2/core/cuda.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/core/include/opencv2/core/cuda.hpp b/modules/core/include/opencv2/core/cuda.hpp index 9800877a77..716b8bf2a8 100644 --- a/modules/core/include/opencv2/core/cuda.hpp +++ b/modules/core/include/opencv2/core/cuda.hpp @@ -452,8 +452,16 @@ public: GpuMatND(const GpuMatND&) = default; GpuMatND& operator=(const GpuMatND&) = default; +#if defined(__GNUC__) && __GNUC__ < 5 + // error: function '...' defaulted on its first declaration with an exception-specification + // that differs from the implicit declaration '...' + + GpuMatND(GpuMatND&&) = default; + GpuMatND& operator=(GpuMatND&&) = default; +#else GpuMatND(GpuMatND&&) noexcept = default; GpuMatND& operator=(GpuMatND&&) noexcept = default; +#endif void upload(InputArray src); void upload(InputArray src, Stream& stream);