From 87e8deecc548921a11390e14703367f560db2bb2 Mon Sep 17 00:00:00 2001 From: Mathias Anselmann Date: Fri, 21 May 2021 20:59:59 +0200 Subject: [PATCH] add preprocessor directive to restrict changes to GCC >= 11 and Intel compilers --- include/deal.II/base/tensor.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index d0ab1225be..ff2975cb1a 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -157,6 +157,7 @@ public: constexpr DEAL_II_CUDA_HOST_DEV Tensor(const Tensor<0, dim, OtherNumber> &initializer); +#if __GNUC__ >= 11 || defined __INTEL_COMPILER /** * Constructor, where the data is copied from a C-style array. * @@ -189,6 +190,7 @@ public: */ constexpr DEAL_II_CUDA_HOST_DEV Tensor<0, dim, Number> & operator=(Tensor<0, dim, Number> &&other) noexcept; +#endif /** * Return a pointer to the first element of the underlying storage. @@ -558,6 +560,7 @@ public: constexpr operator Tensor<1, dim, Tensor>() const; +#if __GNUC__ >= 11 || defined __INTEL_COMPILER /** * Copy constructor */ @@ -579,6 +582,7 @@ public: */ constexpr Tensor & operator=(Tensor &&) noexcept; +#endif /** * Read-Write access operator. @@ -919,6 +923,7 @@ constexpr DEAL_II_ALWAYS_INLINE DEAL_II_CUDA_HOST_DEV +# if __GNUC__ >= 11 || defined __INTEL_COMPILER template constexpr DEAL_II_ALWAYS_INLINE DEAL_II_CUDA_HOST_DEV Tensor<0, dim, Number>::Tensor(const Tensor<0, dim, Number> &other) @@ -952,6 +957,7 @@ constexpr DEAL_II_ALWAYS_INLINE DEAL_II_CUDA_HOST_DEV Tensor<0, dim, Number> & value = std::move(other.value); return *this; } +# endif @@ -1276,6 +1282,7 @@ constexpr DEAL_II_ALWAYS_INLINE Tensor:: } +# if __GNUC__ >= 11 || defined __INTEL_COMPILER template constexpr DEAL_II_ALWAYS_INLINE Tensor::Tensor(const Tensor &other) @@ -1313,6 +1320,7 @@ constexpr DEAL_II_ALWAYS_INLINE Tensor & values[i] = other.values[i]; return *this; } +# endif namespace internal -- 2.39.5