From f9a668be61d058689ea3c34f7ab3be21537d9f7f Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 1 Feb 2024 11:43:03 -0700 Subject: [PATCH] Use DEAL_II_CXX23_ASSERT in the Tensor class. --- include/deal.II/base/tensor.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index 3f01782dc8..2d5e78e495 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -1537,6 +1537,7 @@ constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE Assert(dim != 0, ExcMessage("Cannot access an object of type Tensor")); AssertIndexRange(i, dim); + DEAL_II_CXX23_ASSUME(i < dim); return values[i]; } @@ -1550,6 +1551,7 @@ constexpr DEAL_II_ALWAYS_INLINE Assert(dim != 0, ExcMessage("Cannot access an object of type Tensor")); AssertIndexRange(i, dim); + DEAL_II_CXX23_ASSUME(i < dim); return values[i]; } -- 2.39.5