Enhance SWIG_isfinite for older standards: C++03/C++98/C89
Fixes testcase overload_numeric with -std=c++98 (clang and gcc 6 and later) Issue #1239
This commit is contained in:
parent
7ecf6a71b0
commit
3e4b7269c0
1 changed files with 6 additions and 0 deletions
|
|
@ -118,6 +118,12 @@ inline int SWIG_isfinite_func(T x) {
|
|||
return isfinite(x);
|
||||
}
|
||||
# define SWIG_isfinite(X) (SWIG_isfinite_func(X))
|
||||
# elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
|
||||
# define SWIG_isfinite(X) (__builtin_isfinite(X))
|
||||
# elif defined(__clang__) && defined(__has_builtin)
|
||||
# if __has_builtin(__builtin_isfinite)
|
||||
# define SWIG_isfinite(X) (__builtin_isfinite(X))
|
||||
# endif
|
||||
# elif defined(_MSC_VER)
|
||||
# define SWIG_isfinite(X) (_finite(X))
|
||||
# elif defined(__sun) && defined(__SVR4)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue