From: Wolfgang Bangerth Date: Mon, 9 Jan 2023 22:24:50 +0000 (-0700) Subject: Get rid of a template argument on an exception. X-Git-Tag: v9.5.0-rc1~669^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=232528a089a84905b5d71f412d7472ddca8d2b2f;p=dealii.git Get rid of a template argument on an exception. --- diff --git a/include/deal.II/grid/reference_cell.h b/include/deal.II/grid/reference_cell.h index 8b1e58f97f..b149d0dc64 100644 --- a/include/deal.II/grid/reference_cell.h +++ b/include/deal.II/grid/reference_cell.h @@ -2336,7 +2336,7 @@ ReferenceCell::standard_vs_true_line_orientation( namespace internal { - template + template class NoPermutation : public dealii::ExceptionBase { public: @@ -2344,12 +2344,15 @@ namespace internal * Constructor. */ NoPermutation(const dealii::ReferenceCell &entity_type, - const std::array & vertices_0, - const std::array & vertices_1) + const ArrayView & vertices_0, + const ArrayView & vertices_1) : entity_type(entity_type) , vertices_0(vertices_0) , vertices_1(vertices_1) - {} + { + Assert(vertices_0.size() >= entity_type.n_vertices(), ExcInternalError()); + Assert(vertices_1.size() >= entity_type.n_vertices(), ExcInternalError()); + } /** * Destructor. @@ -2373,7 +2376,7 @@ namespace internal out << ','; } - out << "] is not a permutation of ["; + out << "] is not a valid permutation of ["; for (unsigned int i = 0; i < n_vertices; ++i) { @@ -2393,12 +2396,12 @@ namespace internal /** * First set of values. */ - const std::array vertices_0; + const ArrayView vertices_0; /** * Second set of values. */ - const std::array vertices_1; + const ArrayView vertices_1; }; } // namespace internal @@ -2496,7 +2499,7 @@ ReferenceCell::compute_orientation(const std::array &vertices_0, return 6; } - Assert(false, (internal::NoPermutation(*this, vertices_0, vertices_1))); + Assert(false, (internal::NoPermutation(*this, vertices_0, vertices_1))); return -1; }