]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Check if a preprocessor variable is defined before use.
authorDavid Wells <wellsd2@rpi.edu>
Wed, 8 Feb 2017 03:12:11 +0000 (22:12 -0500)
committerDavid Wells <wellsd2@rpi.edu>
Wed, 8 Feb 2017 03:12:11 +0000 (22:12 -0500)
Clang complains about this with -Wundef on.

source/hp/dof_handler.cc

index 65833da8bbc574df44db5b57a851724548e01e88..788ae35d0a7fdc4503fb3149812e9e7a8adae5c3 100644 (file)
@@ -39,7 +39,7 @@ DEAL_II_NAMESPACE_OPEN
 // distinguish between dealii::DoFHandler and dealii::hp::DoFHandler.
 // Plus it makes code in dof_handler.cc easier to read.
 // Requires C++11 support which is in Visual Studio 2013 and newer.
-#if _MSC_VER >= 1800
+#if defined(_MSC_VER) && (_MSC_VER >= 1800)
 template <int dim, int spacedim> using HpDoFHandler = ::dealii::hp::DoFHandler<dim, spacedim>;
 #else
 // When using older Visual Studio or a different compiler just fall back.

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.