1 //  Copyright John Maddock 2013.
2 //  Use, modification and distribution are subject to the
3 //  Boost Software License, Version 1.0. (See accompanying file
4 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 #ifndef BOOST_MATH_COMPILE_POISON_HPP
7 #define BOOST_MATH_COMPILE_POISON_HPP
8 
9 #include <cmath>
10 #include <math.h>
11 //
12 // We have to include this *before* poisoning the macros
13 // as it needs to be able to use them!
14 //
15 #include <boost/math/special_functions/fpclassify.hpp>
16 
17 //
18 // Poison all the function-like macros in C99 so if we accidentally call them
19 // in an unsafe manner, we'll get compiler errors.  Of course these shouldn't be
20 // macros in C++ at all...
21 //
22 
23 #ifdef fpclassify
24 #undef fpclassify
25 #endif
26 
27 #define fpclassify(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
28 
29 #ifdef isfinite
30 #undef isfinite
31 #endif
32 
33 #define isfinite(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
34 
35 #ifdef isinf
36 #undef isinf
37 #endif
38 
39 #define isinf(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
40 
41 #ifdef isnan
42 #undef isnan
43 #endif
44 
45 #define isnan(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
46 
47 #ifdef isnormal
48 #undef isnormal
49 #endif
50 
51 #define isnormal(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
52 
53 #ifdef signbit
54 #undef signbit
55 #endif
56 
57 #define signbit(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
58 
59 #ifdef isgreater
60 #undef isgreater
61 #endif
62 
63 #define isgreater(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
64 
65 #ifdef isgreaterequal
66 #undef isgreaterequal
67 #endif
68 
69 #define isgreaterequal(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
70 
71 #ifdef isless
72 #undef isless
73 #endif
74 
75 #define isless(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
76 
77 #ifdef islessequal
78 #undef islessequal
79 #endif
80 
81 #define islessequal(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
82 
83 #ifdef islessgreater
84 #undef islessgreater
85 #endif
86 
87 #define islessgreater(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
88 
89 #ifdef isunordered
90 #undef isunordered
91 #endif
92 
93 #define isunordered(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
94 
95 #endif
96 
97