From: Reza Rastak Date: Sun, 21 Jul 2019 18:02:19 +0000 (-0700) Subject: Fixing the issue with clang 4.0.1 X-Git-Tag: v9.2.0-rc1~1366^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49fe1755ee3dfa4729adb60dff5613baaad1715e;p=dealii.git Fixing the issue with clang 4.0.1 --- diff --git a/source/physics/elasticity/standard_tensors.cc b/source/physics/elasticity/standard_tensors.cc index 463003aa83..bdae613b9a 100644 --- a/source/physics/elasticity/standard_tensors.cc +++ b/source/physics/elasticity/standard_tensors.cc @@ -20,32 +20,46 @@ DEAL_II_NAMESPACE_OPEN #ifndef DOXYGEN -# ifndef DEAL_II_HAVE_CXX14_CONSTEXPR_CAN_CALL_NONCONSTEXPR template -const SymmetricTensor<2, dim> - Physics::Elasticity::StandardTensors::I = unit_symmetric_tensor(); +DEAL_II_CONSTEXPR const SymmetricTensor<2, dim> + Physics::Elasticity::StandardTensors::I +# ifndef DEAL_II_HAVE_CXX14_CONSTEXPR_CAN_CALL_NONCONSTEXPR + = unit_symmetric_tensor() +# endif + ; template -const SymmetricTensor<4, dim> - Physics::Elasticity::StandardTensors::S = identity_tensor(); +DEAL_II_CONSTEXPR const SymmetricTensor<4, dim> + Physics::Elasticity::StandardTensors::S +# ifndef DEAL_II_HAVE_CXX14_CONSTEXPR_CAN_CALL_NONCONSTEXPR + = identity_tensor() +# endif + ; template -const SymmetricTensor<4, dim> Physics::Elasticity::StandardTensors::IxI = - outer_product(unit_symmetric_tensor(), unit_symmetric_tensor()); +DEAL_II_CONSTEXPR const SymmetricTensor<4, dim> + Physics::Elasticity::StandardTensors::IxI +# ifndef DEAL_II_HAVE_CXX14_CONSTEXPR_CAN_CALL_NONCONSTEXPR + = outer_product(unit_symmetric_tensor(), unit_symmetric_tensor()) +# endif + ; template -const SymmetricTensor<4, dim> - Physics::Elasticity::StandardTensors::dev_P = deviator_tensor(); +DEAL_II_CONSTEXPR const SymmetricTensor<4, dim> + Physics::Elasticity::StandardTensors::dev_P +# ifndef DEAL_II_HAVE_CXX14_CONSTEXPR_CAN_CALL_NONCONSTEXPR + = deviator_tensor() +# endif + ; -# endif // DEAL_II_HAVE_CXX14_CONSTEXPR_CAN_CALL_NONCONSTEXPR -#endif // DOXYGEN +#endif // DOXYGEN // explicit instantiations #include "standard_tensors.inst"