From 49fe1755ee3dfa4729adb60dff5613baaad1715e Mon Sep 17 00:00:00 2001 From: Reza Rastak Date: Sun, 21 Jul 2019 11:02:19 -0700 Subject: [PATCH] Fixing the issue with clang 4.0.1 --- source/physics/elasticity/standard_tensors.cc | 36 +++++++++++++------ 1 file changed, 25 insertions(+), 11 deletions(-) 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" -- 2.39.5