From: Wolfgang Bangerth Date: Thu, 1 Feb 2024 18:43:03 +0000 (-0700) Subject: Use DEAL_II_CXX23_ASSERT in the Tensor class. X-Git-Tag: relicensing~79^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9a668be61d058689ea3c34f7ab3be21537d9f7f;p=dealii.git Use DEAL_II_CXX23_ASSERT in the Tensor class. --- 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]; }