From: Wolfgang Bangerth Date: Thu, 13 Mar 2025 00:53:22 +0000 (-0600) Subject: Simplify some type construct. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fadbe19ff2ddce523e5cf34e18c24743abecd3c;p=dealii.git Simplify some type construct. --- diff --git a/include/deal.II/base/exception_macros.h b/include/deal.II/base/exception_macros.h index b0eb469fbd..befdf5f9b4 100644 --- a/include/deal.II/base/exception_macros.h +++ b/include/deal.II/base/exception_macros.h @@ -604,16 +604,16 @@ * We accomplish this by using decltype(...) and create a dummy pointer * with these signatures. Notably, this approach works with C++20 onwards. */ -# define Assert(cond, exc) \ - do \ - { \ - typename std::remove_reference::type \ - *dealii_assert_variable_a = nullptr; \ - typename std::remove_reference::type \ - *dealii_assert_variable_b = nullptr; \ - (void)dealii_assert_variable_a; \ - (void)dealii_assert_variable_b; \ - } \ +# define Assert(cond, exc) \ + do \ + { \ + std::remove_reference_t *dealii_assert_variable_a = \ + nullptr; \ + std::remove_reference_t *dealii_assert_variable_b = \ + nullptr; \ + (void)dealii_assert_variable_a; \ + (void)dealii_assert_variable_b; \ + } \ while (false) # else # define Assert(cond, exc) \