blob: 6d72d9d26a336b9d92643f5db52318e66c4a8ec8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
// Copyright John Maddock 2013.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_MATH_COMPILE_POISON_HPP
#define BOOST_MATH_COMPILE_POISON_HPP
#include <cmath>
#include <math.h>
//
// As per https://github.com/boostorg/math/issues/126
// we basically need to include every std lib header we use, otherwise
// our poisoned macros can break legit std lib code.
//
#include <boost/config.hpp>
#include <valarray>
#include <complex>
#include <iosfwd>
#include <sstream>
#include <ostream>
#include <istream>
#include <utility>
#include <iomanip>
#include <typeinfo>
#include <stdexcept>
#include <cstddef>
#include <string>
#include <cstring>
#include <cctype>
#include <limits>
#include <exception>
#include <iterator>
#include <numeric>
#include <vector>
#include <algorithm>
#include <typeinfo>
#include <memory>
#include <cerrno>
#include <functional>
#ifndef BOOST_NO_CXX11_HDR_FUTURE
#include <future>
#endif
#ifndef BOOST_NO_CXX11_HDR_THREAD
#include <thread>
#endif
#ifndef BOOST_NO_CXX11_HDR_RANDOM
#include <random>
#endif
#ifndef BOOST_NO_CXX11_HDR_CHRONO
#include <chrono>
#endif
#include <map>
//
// We have to include this *before* poisoning the macros
// as it needs to be able to use them!
//
#include <boost/math/special_functions/fpclassify.hpp>
//
// Poison all the function-like macros in C99 so if we accidentally call them
// in an unsafe manner, we'll get compiler errors. Of course these shouldn't be
// macros in C++ at all...
//
#ifdef fpclassify
#undef fpclassify
#endif
#define fpclassify(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
#ifdef isfinite
#undef isfinite
#endif
#define isfinite(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
#ifdef isinf
#undef isinf
#endif
#define isinf(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
#ifdef isnan
#undef isnan
#endif
#define isnan(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
#ifdef isnormal
#undef isnormal
#endif
#define isnormal(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
#ifdef signbit
#undef signbit
#endif
#define signbit(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
#ifdef isgreater
#undef isgreater
#endif
#define isgreater(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
#ifdef isgreaterequal
#undef isgreaterequal
#endif
#define isgreaterequal(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
#ifdef isless
#undef isless
#endif
#define isless(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
#ifdef islessequal
#undef islessequal
#endif
#define islessequal(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
#ifdef islessgreater
#undef islessgreater
#endif
#define islessgreater(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
#ifdef isunordered
#undef isunordered
#endif
#define isunordered(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}}
#endif
|