From: David Wells Date: Wed, 18 Aug 2021 13:58:06 +0000 (-0400) Subject: Fix compilation with GCC 5.4. X-Git-Tag: v9.4.0-rc1~1065^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F12666%2Fhead;p=dealii.git Fix compilation with GCC 5.4. Using constexpr here causes an internal compiler error when optimizations are turned on. --- diff --git a/include/deal.II/base/symmetric_tensor.h b/include/deal.II/base/symmetric_tensor.h index 02cb46de8b..60a61ed182 100644 --- a/include/deal.II/base/symmetric_tensor.h +++ b/include/deal.II/base/symmetric_tensor.h @@ -136,7 +136,7 @@ constexpr inline DEAL_II_ALWAYS_INLINE SymmetricTensor<2, dim, Number> deviator(const SymmetricTensor<2, dim, Number> &); template -constexpr inline DEAL_II_ALWAYS_INLINE Number +DEAL_II_CONSTEXPR inline DEAL_II_ALWAYS_INLINE Number determinant(const SymmetricTensor<2, dim, Number> &); @@ -1031,7 +1031,7 @@ private: trace(const SymmetricTensor<2, dim2, Number2> &d); template - friend constexpr Number2 + friend DEAL_II_CONSTEXPR Number2 determinant(const SymmetricTensor<2, dim2, Number2> &t); template @@ -2693,7 +2693,7 @@ constexpr DEAL_II_ALWAYS_INLINE * @relatesalso SymmetricTensor */ template -constexpr inline DEAL_II_ALWAYS_INLINE Number +DEAL_II_CONSTEXPR inline DEAL_II_ALWAYS_INLINE Number determinant(const SymmetricTensor<2, dim, Number> &t) { switch (dim) @@ -2733,7 +2733,7 @@ determinant(const SymmetricTensor<2, dim, Number> &t) * @relatesalso SymmetricTensor */ template -constexpr DEAL_II_ALWAYS_INLINE Number +DEAL_II_CONSTEXPR DEAL_II_ALWAYS_INLINE Number third_invariant(const SymmetricTensor<2, dim, Number> &t) { return determinant(t);