From ecacb4931aa68c1849910d0978d5e44eb724ef2f Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 22 Oct 2017 17:37:28 +0200 Subject: [PATCH] change static_assert into Assert for CylindricalManifold to make it easier writing dimension independent code --- include/deal.II/grid/manifold_lib.h | 7 ------- source/grid/manifold_lib.cc | 8 +++++++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/include/deal.II/grid/manifold_lib.h b/include/deal.II/grid/manifold_lib.h index 6af780a6d0..1955638dcc 100644 --- a/include/deal.II/grid/manifold_lib.h +++ b/include/deal.II/grid/manifold_lib.h @@ -330,13 +330,6 @@ private: */ double tolerance; - // explicitly check for sensible template arguments, but not on windows - // because MSVC creates bogus warnings during normal compilation -#ifndef DEAL_II_MSVC - static_assert (spacedim==3, - "CylindricalManifold can only be used for spacedim==3!"); -#endif - }; diff --git a/source/grid/manifold_lib.cc b/source/grid/manifold_lib.cc index 7de1cede1a..74d8a5023d 100644 --- a/source/grid/manifold_lib.cc +++ b/source/grid/manifold_lib.cc @@ -361,7 +361,13 @@ CylindricalManifold::CylindricalManifold(const Point &d direction (direction_/direction_.norm()), point_on_axis (point_on_axis_), tolerance(tolerance) -{} +{ + // do not use static_assert to make dimension-independent programming + // easier. + Assert (spacedim==3, + ExcMessage("CylindricalManifold can only be used for spacedim==3!")); + +} -- 2.39.5