From c6a5d4dce8995c4a2d19d1b927106263fe13bd2c Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Fri, 1 Sep 2023 08:45:54 +0200 Subject: [PATCH] Another attempt to fix compile warning --- source/base/tensor_product_polynomials.cc | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/source/base/tensor_product_polynomials.cc b/source/base/tensor_product_polynomials.cc index cf14a7de7f..9f52511f2f 100644 --- a/source/base/tensor_product_polynomials.cc +++ b/source/base/tensor_product_polynomials.cc @@ -500,6 +500,7 @@ namespace internal } // namespace internal + template void TensorProductPolynomials::evaluate( @@ -510,9 +511,6 @@ TensorProductPolynomials::evaluate( std::vector> &third_derivatives, std::vector> &fourth_derivatives) const { - if constexpr (dim == 0) - return; - Assert(dim <= 3, ExcNotImplemented()); Assert(values.size() == this->n() || values.empty(), ExcDimensionMismatch2(values.size(), this->n(), 0)); @@ -598,6 +596,22 @@ TensorProductPolynomials::evaluate( +template <> +void +TensorProductPolynomials<0, Polynomials::Polynomial>::evaluate( + const Point<0> &, + std::vector &, + std::vector> &, + std::vector> &, + std::vector> &, + std::vector> &) const +{ + constexpr int dim = 0; + AssertThrow(dim > 0, ExcNotImplemented()); +} + + + template std::unique_ptr> TensorProductPolynomials::clone() const -- 2.39.5