From 80cfa1161764c600bada09e0a3e5419c89dae49a Mon Sep 17 00:00:00 2001 From: Karl Ljungkvist Date: Mon, 21 Nov 2016 12:34:36 +0100 Subject: [PATCH] ensure that correct template parameters have been used --- include/deal.II/dofs/dof_handler.h | 7 +++++++ 1 file changed, 7 insertions(+) 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 }; -- 2.39.5