]> https://gitweb.dealii.org/ - dealii.git/commitdiff
change static_assert into Assert for CylindricalManifold to make it easier writing... 5301/head
authorDenis Davydov <davydden@gmail.com>
Sun, 22 Oct 2017 15:37:28 +0000 (17:37 +0200)
committerDenis Davydov <davydden@gmail.com>
Sun, 22 Oct 2017 15:37:28 +0000 (17:37 +0200)
include/deal.II/grid/manifold_lib.h
source/grid/manifold_lib.cc

index 6af780a6d0c8da5d2d866e6ec0367f54bf520848..1955638dcce6890e769e51afb8e5d2f4a3d39b54 100644 (file)
@@ -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
-
 };
 
 
index 7de1cede1a3e7d31f56535d1ee61eb5c3002c6eb..74d8a5023dc3682dbbb64557ea407bbd8f078a55 100644 (file)
@@ -361,7 +361,13 @@ CylindricalManifold<dim, spacedim>::CylindricalManifold(const Point<spacedim> &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!"));
+
+}
 
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.