]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix DEAL_II_MPI_CONST_CAST 7299/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 8 Oct 2018 11:48:04 +0000 (13:48 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 8 Oct 2018 11:48:04 +0000 (13:48 +0200)
include/deal.II/base/mpi.h

index 359208c7d1732197ac38b4505f93b15c6d9b1c1a..386118ff55da41de410f110ec0addf32568f28a5 100644 (file)
@@ -49,7 +49,8 @@ using MPI_Op       = int;
 
 
 
-/** Helper macro to remove const from the pointer arguments to some MPI_*
+/**
+ * Helper macro to remove const from the pointer arguments to some MPI_*
  * functions.
  *
  * This is needed as the input arguments of functions like MPI_Allgather() are
@@ -70,10 +71,9 @@ using MPI_Op       = int;
 
 #    include <type_traits>
 
-#    define DEAL_II_MPI_CONST_CAST(expr)                                       \
-      const_cast<                                                              \
-        std::remove_const<std::remove_pointer<decltype(expr)>::type>::type *>( \
-        expr)
+#    define DEAL_II_MPI_CONST_CAST(expr)     \
+      const_cast<typename std::remove_const< \
+        typename std::remove_pointer<decltype(expr)>::type>::type *>(expr)
 
 #  endif
 #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.