From: Daniel Arndt Date: Fri, 1 Feb 2019 13:12:29 +0000 (+0100) Subject: Fix compiling with MSVC X-Git-Tag: v9.1.0-rc1~381^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7672%2Fhead;p=dealii.git Fix compiling with MSVC --- diff --git a/include/deal.II/base/subscriptor.h b/include/deal.II/base/subscriptor.h index 431f8c03e4..aae53ff17d 100644 --- a/include/deal.II/base/subscriptor.h +++ b/include/deal.II/base/subscriptor.h @@ -340,6 +340,11 @@ Subscriptor::list_subscribers(StreamType &stream) const << it.first << '\"' << std::endl; } +// forward declare template specialization +template <> +void +Subscriptor::subscribe(std::atomic *const validity, + const char * id) const; DEAL_II_NAMESPACE_CLOSE #endif diff --git a/include/deal.II/base/vectorization.h b/include/deal.II/base/vectorization.h index 3f82e165c5..1b8c47005c 100644 --- a/include/deal.II/base/vectorization.h +++ b/include/deal.II/base/vectorization.h @@ -178,7 +178,7 @@ public: * case, there is only one element. Specializations use SIMD intrinsics and * can work on multiple elements at the same time. */ - static const unsigned int n_array_elements; + static const unsigned int n_array_elements = 1; // POD means that there should be no user-defined constructors, destructors // and copy functions (the standard is somewhat relaxed in C++2011, though). @@ -453,7 +453,7 @@ private: // We need to have a separate declaration for static const members template -const unsigned int VectorizedArray::n_array_elements = 1; +const unsigned int VectorizedArray::n_array_elements; diff --git a/source/base/vectorization.cc b/source/base/vectorization.cc index 1cc3fe6de6..88ffb1f6bc 100644 --- a/source/base/vectorization.cc +++ b/source/base/vectorization.cc @@ -17,7 +17,7 @@ DEAL_II_NAMESPACE_OPEN -#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 +#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && !defined(DEAL_II_MSVC) const unsigned int VectorizedArray::n_array_elements; const unsigned int VectorizedArray::n_array_elements; #endif