From 0da0e29d25eb059654dc9a161f1c3d9e7333b790 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 8 Mar 2023 06:25:28 -0700 Subject: [PATCH] Remove another avoidable use of 'typename ...::type'. --- include/deal.II/base/exceptions.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/include/deal.II/base/exceptions.h b/include/deal.II/base/exceptions.h index b2739df6cc..ba4ae6b402 100644 --- a/include/deal.II/base/exceptions.h +++ b/include/deal.II/base/exceptions.h @@ -1789,7 +1789,7 @@ namespace internal // Workaround to allow for commas in template parameter lists // in preprocessor macros as found in // https://stackoverflow.com/questions/13842468/comma-in-c-c-macro - template + template struct argument_type; template @@ -1797,6 +1797,9 @@ namespace internal { using type = U; }; + + template + using argument_type_t = typename argument_type::type; } // namespace internal /** @@ -1818,13 +1821,13 @@ namespace internal * * @ingroup Exceptions */ -#define AssertIndexRange(index, range) \ - Assert( \ - ::dealii::deal_II_exceptions::internals::compare_less_than(index, range), \ - dealii::ExcIndexRangeType)>::type>((index), \ - 0, \ - (range))) +#define AssertIndexRange(index, range) \ + Assert(::dealii::deal_II_exceptions::internals::compare_less_than(index, \ + range), \ + dealii::ExcIndexRangeType<::dealii::internal::argument_type_t)>>((index), \ + 0, \ + (range))) /** * An assertion that checks whether a number is finite or not. We explicitly -- 2.39.5