]> https://gitweb.dealii.org/ - dealii.git/commitdiff
config.h: for consistency rename DEAL_II_ASSUME to DEAL_II_CXX23_ASSUME
authorMatthias Maier <tamiko@43-1.org>
Fri, 19 Jan 2024 17:22:11 +0000 (11:22 -0600)
committerMatthias Maier <tamiko@43-1.org>
Fri, 19 Jan 2024 17:22:11 +0000 (11:22 -0600)
include/deal.II/base/config.h.in
include/deal.II/base/exceptions.h

index 8dbd40e313e36804f4a91fe6eff7bf345222f085..c9943b3efea1954c76f824d6e5d509d244ec3fa5 100644 (file)
  * available.
  */
 #if defined(__clang__)
-#  define DEAL_II_ASSUME(expr) __builtin_assume(static_cast<bool>(expr))
+#  define DEAL_II_CXX23_ASSUME(expr) __builtin_assume(static_cast<bool>(expr))
 #elif defined(__GNUC__) && !defined(__ICC) && __GNUC__ >= 13
-#  define DEAL_II_ASSUME(expr)                                         \
+#  define DEAL_II_CXX23_ASSUME(expr)                                   \
     do                                                                 \
       {                                                                \
         _Pragma("GCC diagnostic push")                                 \
       }                                                                \
     while (false)
 #elif defined(_MSC_VER) || defined(__ICC)
-#  define DEAL_II_ASSUME(expr) __assume(expr);
+#  define DEAL_II_CXX23_ASSUME(expr) __assume(expr);
 #else
 /* no way with GCC to express this without evaluating 'expr' */
-#  define DEAL_II_ASSUME(expr) \
-    do                         \
-      {                        \
-      }                        \
+#  define DEAL_II_CXX23_ASSUME(expr) \
+    do                               \
+      {                              \
+      }                              \
     while (false)
 #endif
 
index a82b4eeacd9a4f4d0ccbec55ab096b287c9b6cd0..ea95ca2d850f79b55b2c9af8511860490a52870e 100644 (file)
@@ -1637,7 +1637,7 @@ namespace deal_II_exceptions
 #    endif /*ifdef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST*/
 #  endif   /*KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST*/
 #else      /*ifdef DEBUG*/
-#  define Assert(cond, exc) DEAL_II_ASSUME(cond)
+#  define Assert(cond, exc) DEAL_II_CXX23_ASSUME(cond)
 #endif /*ifdef DEBUG*/
 
 
@@ -1689,7 +1689,7 @@ namespace deal_II_exceptions
       while (false)
 #  endif /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/
 #else
-#  define AssertNothrow(cond, exc) DEAL_II_ASSUME(cond)
+#  define AssertNothrow(cond, exc) DEAL_II_CXX23_ASSUME(cond)
 #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.