From: David Wells Date: Tue, 31 Dec 2024 18:19:30 +0000 (-0500) Subject: Add an MSVC workaround. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a95ec1338a4843166fffe7dfdc133bb72e9d21c;p=dealii.git Add an MSVC workaround. The unguarded version works with MSVC 2022 but fails with MSVC 2019. --- diff --git a/include/deal.II/grid/tria_accessor.h b/include/deal.II/grid/tria_accessor.h index 509995fea5..ad2de80d1d 100644 --- a/include/deal.II/grid/tria_accessor.h +++ b/include/deal.II/grid/tria_accessor.h @@ -3240,7 +3240,12 @@ public: */ boost::container::small_vector< TriaIterator>, - ReferenceCell::max_n_faces()> +#ifndef _MSC_VER // MSVC prior to 2022 cannot use a constexpr function this way + ReferenceCell::max_n_faces() +#else + GeometryInfo::faces_per_cell +#endif + > face_iterators() const; /** @@ -7684,12 +7689,22 @@ CellAccessor::face_iterator_to_index( template inline boost::container::small_vector< TriaIterator>, - ReferenceCell::max_n_faces()> +# ifndef _MSC_VER + ReferenceCell::max_n_faces() +# else + GeometryInfo::faces_per_cell +# endif + > CellAccessor::face_iterators() const { boost::container::small_vector< TriaIterator>, - ReferenceCell::max_n_faces()> +# ifndef _MSC_VER + ReferenceCell::max_n_faces() +# else + GeometryInfo::faces_per_cell +# endif + > face_iterators(this->n_faces()); for (const unsigned int i : this->face_indices())