From: Wolfgang Bangerth Date: Thu, 24 Nov 2016 18:48:37 +0000 (-0700) Subject: Add a couple more static assertions. X-Git-Tag: v8.5.0-rc1~361^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5292ba7934ef6aa912050ebd85dc25b27c10cbeb;p=dealii.git Add a couple more static assertions. --- diff --git a/include/deal.II/grid/manifold.h b/include/deal.II/grid/manifold.h index a1fda6dfb2..8e97d71509 100644 --- a/include/deal.II/grid/manifold.h +++ b/include/deal.II/grid/manifold.h @@ -298,6 +298,14 @@ class Manifold : public Subscriptor { public: + // explicitly check for sensible template arguments +#ifdef DEAL_II_WITH_CXX11 + static_assert (dim<=spacedim, + "The dimension of a Manifold must be less than or " + "equal to the space dimension in which it lives."); +#endif + + /** * Type keeping information about the normals at the vertices of a face of a * cell. Thus, there are GeometryInfo::vertices_per_face @@ -879,6 +887,13 @@ template class ChartManifold : public Manifold { public: + // explicitly check for sensible template arguments +#ifdef DEAL_II_WITH_CXX11 + static_assert (dim<=spacedim, + "The dimension of a ChartManifold must be less than or " + "equal to the space dimension in which it lives."); +#endif + /** * Constructor. The optional argument can be used to specify the periodicity * of the chartdim-dimensional manifold (one period per direction). A