From: Daniel Arndt Date: Fri, 15 Jun 2018 16:52:49 +0000 (+0200) Subject: Fix compiling with older Intel compilers X-Git-Tag: v9.0.1~2^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=056048fb8c1d5967a0fffa1f9fde0e104a44aee4;p=dealii.git Fix compiling with older Intel compilers --- diff --git a/include/deal.II/fe/fe_system.h b/include/deal.II/fe/fe_system.h index db753852f4..2cc5bc2d77 100644 --- a/include/deal.II/fe/fe_system.h +++ b/include/deal.II/fe/fe_system.h @@ -459,18 +459,21 @@ public: * In other words, if no multiplicity for an element is explicitly specified * via the exponentiation operation, then it is assumed to be one (as one * would have expected). + * + * @warning This feature is not available for Intel compilers + * prior to version 19.0 */ - template ::type, - std::pair>, unsigned int>>::value - || - std::is_base_of, - typename std::decay::type>::value) - ... - >::type - > FESystem (FEPairs &&... fe_pairs); +# if !defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1900 + template < + class... FEPairs, + typename = typename enable_if_all< + (std::is_same::type, + std::pair>, + unsigned int>>::value || + std::is_base_of, + typename std::decay::type>::value)...>::type> + FESystem(FEPairs &&... fe_pairs); /** * Same as above allowing the following syntax: @@ -479,9 +482,14 @@ public: * FiniteElementType1 fe_2; * FESystem fe_system = { fe_1^dim, fe_2^1 }; * @endcode + * + * @warning This feature is not available for Intel compilers + * prior to version 19.0 */ - FESystem (const std::initializer_list>, - unsigned int>> &fe_systems); + FESystem( + const std::initializer_list< + std::pair>, unsigned int>> + &fe_systems); /** * Copy constructor. This constructor is deleted, i.e., copying @@ -1208,15 +1216,19 @@ namespace -// We are just forwarding/delegating to the constructor taking a std::initializer_list. -// If we decide to remove the deprecated constructors, we might just use the variadic -// constructor with a suitable static_assert instead of the std::enable_if. -template -template -FESystem::FESystem (FEPairs &&... fe_pairs) - : - FESystem ({promote_to_fe_pair(std::forward(fe_pairs))...}) +# if !defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1900 +// We are just forwarding/delegating to the constructor taking a +// std::initializer_list. If we decide to remove the deprecated constructors, we +// might just use the variadic constructor with a suitable static_assert instead +// of the std::enable_if. +template +template +FESystem::FESystem(FEPairs &&... fe_pairs) + : FESystem( +{ + promote_to_fe_pair( + std::forward(fe_pairs))... +}) {} @@ -1248,6 +1260,7 @@ FESystem::FESystem initialize(fes, multiplicities); } +# endif #endif //DOXYGEN diff --git a/source/base/mpi.cc b/source/base/mpi.cc index 38e8122f10..3391d81cc7 100644 --- a/source/base/mpi.cc +++ b/source/base/mpi.cc @@ -23,7 +23,7 @@ #include #include -#include +#include #include #ifdef DEAL_II_WITH_TRILINOS