From: Denis Davydov <davydden@gmail.com> Date: Tue, 26 Feb 2019 17:32:37 +0000 (+0100) Subject: make old compilers happy X-Git-Tag: v9.1.0-rc1~319^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7754%2Fhead;p=dealii.git make old compilers happy --- diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index ac87eea988..337846d4bd 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -3423,10 +3423,13 @@ namespace internal // finally here we check if our detector has non-void return type // T::value_type. This will happen if compiler can use second detector, // otherwise SFINAE let it work with the more general first one that is void - static constexpr bool value = + static const bool value = !std::is_same<void, decltype(detect(std::declval<T>()))>::value; }; + // We need to have a separate declaration for static const members + template <typename T> + const bool has_local_element<T>::value; // same as above to check // bool T::partitioners_are_compatible(const Utilities::MPI::Partitioner &) @@ -3444,10 +3447,13 @@ namespace internal detect(const U &); public: - static constexpr bool value = + static const bool value = std::is_same<bool, decltype(detect(std::declval<T>()))>::value; }; + // We need to have a separate declaration for static const members + template <typename T> + const bool has_partitioners_are_compatible<T>::value; // same as above to check @@ -3464,10 +3470,13 @@ namespace internal detect(const U &); public: - static constexpr bool value = + static const bool value = !std::is_same<void, decltype(detect(std::declval<T>()))>::value; }; + // We need to have a separate declaration for static const members + template <typename T> + const bool has_begin<T>::value; // type trait for vector T and Number to see if @@ -3478,12 +3487,15 @@ namespace internal template <typename T, typename Number> struct is_vectorizable { - static constexpr bool value = + static const bool value = has_begin<T>::value && (has_local_element<T>::value || is_serial_vector<T>::value) && std::is_same<typename T::value_type, Number>::value; }; + // We need to have a separate declaration for static const members + template <typename T, typename Number> + const bool is_vectorizable<T, Number>::value; // access to generic const vectors that have operator ().