]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove another avoidable use of 'typename ...::type'.
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 8 Mar 2023 13:25:28 +0000 (06:25 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 8 Mar 2023 13:25:28 +0000 (06:25 -0700)
include/deal.II/base/exceptions.h

index b2739df6cc94675a0e3665cd84892408df3a5c38..ba4ae6b40270110e7d21f6d7c000ca8ed8450059 100644 (file)
@@ -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 <typename T>
+  template <typename F>
   struct argument_type;
 
   template <typename T, typename U>
@@ -1797,6 +1797,9 @@ namespace internal
   {
     using type = U;
   };
+
+  template <typename F>
+  using argument_type_t = typename argument_type<F>::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<typename ::dealii::internal::argument_type<void( \
-      std::common_type_t<decltype(index), decltype(range)>)>::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<void( \
+           std::common_type_t<decltype(index), decltype(range)>)>>((index),  \
+                                                                   0,        \
+                                                                   (range)))
 
 /**
  * An assertion that checks whether a number is finite or not. We explicitly

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.