Merge pull request #9177 from tagcup/gcc5_isinf

Use inline code for isinf with gcc versions <6.
This commit is contained in:
Rémi Verschelde 2017-06-15 20:46:10 +02:00 committed by GitHub
commit 4f8d9f0915
1 changed files with 4 additions and 4 deletions

View File

@ -110,8 +110,8 @@ public:
static _ALWAYS_INLINE_ bool is_inf(double p_val) { static _ALWAYS_INLINE_ bool is_inf(double p_val) {
#ifdef _MSC_VER #ifdef _MSC_VER
return !_finite(p_val); return !_finite(p_val);
// workaround for mingw builds on travis // use an inline implementation of isinf as a workaround for problematic libstdc++ versions from gcc 5.x era
#elif defined(__MINGW32__) || defined(__MINGW64__) #elif defined(__GNUC__) && __GNUC__ < 6
union { union {
uint64_t u; uint64_t u;
double f; double f;
@ -127,8 +127,8 @@ public:
static _ALWAYS_INLINE_ bool is_inf(float p_val) { static _ALWAYS_INLINE_ bool is_inf(float p_val) {
#ifdef _MSC_VER #ifdef _MSC_VER
return !_finite(p_val); return !_finite(p_val);
// workaround for mingw builds on travis // use an inline implementation of isinf as a workaround for problematic libstdc++ versions from gcc 5.x era
#elif defined(__MINGW32__) || defined(__MINGW64__) #elif defined(__GNUC__) && __GNUC__ < 6
union { union {
uint32_t u; uint32_t u;
float f; float f;