From: David Wells Date: Sat, 11 Nov 2023 17:18:35 +0000 (-0500) Subject: SymmetricTensor: don't call DEAL_II_CONSTEXPR from constexpr. X-Git-Tag: relicensing~304^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d7abe92ba33ed453857f6b63ff662dc8631179b;p=dealii.git SymmetricTensor: don't call DEAL_II_CONSTEXPR from constexpr. This isn't guaranteed to work. --- diff --git a/include/deal.II/base/symmetric_tensor.h b/include/deal.II/base/symmetric_tensor.h index 33265eff9e..5bf97c94b5 100644 --- a/include/deal.II/base/symmetric_tensor.h +++ b/include/deal.II/base/symmetric_tensor.h @@ -2055,8 +2055,9 @@ namespace internal if (indices[0] == indices[1]) return indices[0]; - TableIndices<2> sorted_indices(indices); - sorted_indices.sort(); + const TableIndices<2> sorted_indices( + std::min(indices[0], indices[1]), + std::max(indices[0], indices[1])); for (unsigned int d = 0, c = 0; d < dim; ++d) for (unsigned int e = d + 1; e < dim; ++e, ++c)