From: Denis Davydov Date: Sun, 22 Oct 2017 15:37:28 +0000 (+0200) Subject: change static_assert into Assert for CylindricalManifold to make it easier writing... X-Git-Tag: v9.0.0-rc1~904^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecacb4931aa68c1849910d0978d5e44eb724ef2f;p=dealii.git change static_assert into Assert for CylindricalManifold to make it easier writing dimension independent code --- 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!")); + +}