]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Prefer std::conditional_t over std::conditional::type.
authorWolfgang Bangerth <bangerth@colostate.edu>
Sun, 23 Jul 2023 02:39:50 +0000 (20:39 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 23 Jul 2023 02:39:50 +0000 (20:39 -0600)
include/deal.II/matrix_free/evaluation_kernels.h

index 28a36ef5a1750e521b0b7237f2204f69f7c51527..664f5d15e14dd574822c75810aebf648cf7816b3 100644 (file)
@@ -1062,12 +1062,9 @@ namespace internal
                                         normal_dir,
                                         Number,
                                         Number2>;
-    using Eval0 =
-      typename std::conditional<normal_dir == 0, EvalNormal, EvalTangent>::type;
-    using Eval1 =
-      typename std::conditional<normal_dir == 1, EvalNormal, EvalTangent>::type;
-    using Eval2 =
-      typename std::conditional<normal_dir == 2, EvalNormal, EvalTangent>::type;
+    using Eval0 = std::conditional_t<normal_dir == 0, EvalNormal, EvalTangent>;
+    using Eval1 = std::conditional_t<normal_dir == 1, EvalNormal, EvalTangent>;
+    using Eval2 = std::conditional_t<normal_dir == 2, EvalNormal, EvalTangent>;
 
     const auto &shape_info = fe_eval.get_shape_info();
     Eval0       eval0      = create_evaluator_tensor_product<Eval0>(
@@ -1258,12 +1255,9 @@ namespace internal
                                         normal_dir,
                                         Number,
                                         Number2>;
-    using Eval0 =
-      typename std::conditional<normal_dir == 0, EvalNormal, EvalTangent>::type;
-    using Eval1 =
-      typename std::conditional<normal_dir == 1, EvalNormal, EvalTangent>::type;
-    using Eval2 =
-      typename std::conditional<normal_dir == 2, EvalNormal, EvalTangent>::type;
+    using Eval0 = std::conditional_t<normal_dir == 0, EvalNormal, EvalTangent>;
+    using Eval1 = std::conditional_t<normal_dir == 1, EvalNormal, EvalTangent>;
+    using Eval2 = std::conditional_t<normal_dir == 2, EvalNormal, EvalTangent>;
 
     const auto &shape_info = fe_eval.get_shape_info();
     Eval0       eval0      = create_evaluator_tensor_product<Eval0>(

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.