]> https://gitweb.dealii.org/ - dealii.git/commitdiff
base/config.h: enable DEAL_II_CXX23_ASSUME macro
authorMatthias Maier <tamiko@43-1.org>
Sun, 21 Jan 2024 20:52:05 +0000 (14:52 -0600)
committerMatthias Maier <tamiko@43-1.org>
Sun, 21 Jan 2024 20:53:34 +0000 (14:53 -0600)
include/deal.II/base/config.h.in

index 29be3d6fa917e4d9a9c0f56ceffb3abe25e5bb23..c9943b3efea1954c76f824d6e5d509d244ec3fa5 100644 (file)
  * attribute for older standards we rely on compiler intrinsics when
  * available.
  */
-#ifdef DEAL_II_EXPERIMENTAL_ASSUME
-#  error "Test"
-#  if defined(__clang__)
-#    define DEAL_II_CXX23_ASSUME(expr) __builtin_assume(static_cast<bool>(expr))
-#  elif defined(__GNUC__) && !defined(__ICC) && __GNUC__ >= 13
-#    define DEAL_II_CXX23_ASSUME(expr)                                   \
-      do                                                                 \
-        {                                                                \
-          _Pragma("GCC diagnostic push")                                 \
-            _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") \
-              [[assume(expr)]];                                          \
-          _Pragma("GCC diagnostic pop")                                  \
-        }                                                                \
-      while (false)
-#  elif defined(_MSC_VER) || defined(__ICC)
-#    define DEAL_II_CXX23_ASSUME(expr) __assume(expr);
-#  else
-/* no way with GCC to express this without evaluating 'expr' */
-#    define DEAL_II_CXX23_ASSUME(expr) \
-      do                               \
-        {                              \
-        }                              \
-      while (false)
-#  endif
+#if defined(__clang__)
+#  define DEAL_II_CXX23_ASSUME(expr) __builtin_assume(static_cast<bool>(expr))
+#elif defined(__GNUC__) && !defined(__ICC) && __GNUC__ >= 13
+#  define DEAL_II_CXX23_ASSUME(expr)                                   \
+    do                                                                 \
+      {                                                                \
+        _Pragma("GCC diagnostic push")                                 \
+          _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") \
+            [[assume(expr)]];                                          \
+        _Pragma("GCC diagnostic pop")                                  \
+      }                                                                \
+    while (false)
+#elif defined(_MSC_VER) || defined(__ICC)
+#  define DEAL_II_CXX23_ASSUME(expr) __assume(expr);
 #else
+/* no way with GCC to express this without evaluating 'expr' */
 #  define DEAL_II_CXX23_ASSUME(expr) \
     do                               \
       {                              \

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.