summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac>2013-01-14 17:44:30 +0000
committereschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac>2013-01-14 17:44:30 +0000
commit89602bea2d859320b5b4547b00524a04903e7da2 (patch)
treed0cd6ad83118a0c5d2b7601aace195228d564c8a /src
parentc61c47ecde70bddcd1cdaebc01f8edc3b7a51c63 (diff)
Always include <cmath> and <math.h> in the same order
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4932 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src')
-rw-r--r--src/include/cctk_Math.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/include/cctk_Math.h b/src/include/cctk_Math.h
index bd7c3f6f..e51c991f 100644
--- a/src/include/cctk_Math.h
+++ b/src/include/cctk_Math.h
@@ -13,8 +13,16 @@
#define _CCTK_MATH_H_
#ifdef __cplusplus
-# include <math.h>
+/* Note: Some C++ implementations differ in their behaviour (how isnan
+ etc. can be accessed) depending on the order (!) in which <cmath>
+ and <math.h> is included, if both are included.
+
+ We therefore require: A file including this file may include
+ <cmath> at will, and is allowed to include <math.h> if <cmath> is
+ included before. We do this because <cmath> seems "more standard"
+ than <math.h> for C++ these days. */
# include <cmath>
+# include <math.h>
# include <cctk_Config.h>
# include <cctk_Types.h>
#endif