]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix compiling with MSVC 7672/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 1 Feb 2019 13:12:29 +0000 (14:12 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 1 Feb 2019 13:20:50 +0000 (14:20 +0100)
include/deal.II/base/subscriptor.h
include/deal.II/base/vectorization.h
source/base/vectorization.cc

index 431f8c03e4126940855d5b07fba4d257a599afa7..aae53ff17d1783befcb04060824c2f7863f28eb8 100644 (file)
@@ -340,6 +340,11 @@ Subscriptor::list_subscribers(StreamType &stream) const
            << it.first << '\"' << std::endl;
 }
 
+// forward declare template specialization
+template <>
+void
+Subscriptor::subscribe<const char *>(std::atomic<bool> *const validity,
+                                     const char *             id) const;
 DEAL_II_NAMESPACE_CLOSE
 
 #endif
index 3f82e165c52e5eb58150474f621f7f9a1ca02c82..1b8c47005c3ca0dd43b1ba94181bcbe8911af384 100644 (file)
@@ -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 <typename Number>
-const unsigned int VectorizedArray<Number>::n_array_elements = 1;
+const unsigned int VectorizedArray<Number>::n_array_elements;
 
 
 
index 1cc3fe6de66728165452a348f669e8bf497c87f7..88ffb1f6bce96400aa8894ff8d8689f38f7f3583 100644 (file)
@@ -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<double>::n_array_elements;
 const unsigned int VectorizedArray<float>::n_array_elements;
 #endif

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.