From: Karl Ljungkvist Date: Mon, 21 Nov 2016 11:34:36 +0000 (+0100) Subject: ensure that correct template parameters have been used X-Git-Tag: v8.5.0-rc1~375^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3621%2Fhead;p=dealii.git ensure that correct template parameters have been used --- diff --git a/include/deal.II/dofs/dof_handler.h b/include/deal.II/dofs/dof_handler.h index bb89fba363..02a6d85f2d 100644 --- a/include/deal.II/dofs/dof_handler.h +++ b/include/deal.II/dofs/dof_handler.h @@ -1093,6 +1093,13 @@ private: friend struct dealii::internal::DoFHandler::Implementation; friend struct dealii::internal::DoFHandler::Policy::Implementation; + + // explicitly check for sensible template arguments +#ifdef DEAL_II_WITH_CXX11 + static_assert (dim<=spacedim, + "The dimension of a DoFHandler must be less than or " + "equal to the space dimension in which it lives."); +#endif };