From: Matthias Maier Date: Fri, 19 Jan 2024 17:22:11 +0000 (-0600) Subject: config.h: for consistency rename DEAL_II_ASSUME to DEAL_II_CXX23_ASSUME X-Git-Tag: relicensing~132^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4caa9cd13cbb5fddb8ab62c67fbf0405de6a85b9;p=dealii.git config.h: for consistency rename DEAL_II_ASSUME to DEAL_II_CXX23_ASSUME --- diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index 8dbd40e313..c9943b3efe 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -184,9 +184,9 @@ * available. */ #if defined(__clang__) -# define DEAL_II_ASSUME(expr) __builtin_assume(static_cast(expr)) +# define DEAL_II_CXX23_ASSUME(expr) __builtin_assume(static_cast(expr)) #elif defined(__GNUC__) && !defined(__ICC) && __GNUC__ >= 13 -# define DEAL_II_ASSUME(expr) \ +# define DEAL_II_CXX23_ASSUME(expr) \ do \ { \ _Pragma("GCC diagnostic push") \ @@ -196,13 +196,13 @@ } \ 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 diff --git a/include/deal.II/base/exceptions.h b/include/deal.II/base/exceptions.h index a82b4eeacd..ea95ca2d85 100644 --- a/include/deal.II/base/exceptions.h +++ b/include/deal.II/base/exceptions.h @@ -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 /**