Skip to content
Snippets Groups Projects
Commit 58fbf2c4 authored by Kynos's avatar Kynos
Browse files

Remove isnan() and isinf() templated from QGC.h only if prior to Visual Studio 2013

parent 37b02a3a
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,24 @@ ...@@ -33,6 +33,24 @@
/* Windows fixes */ /* Windows fixes */
#ifdef _MSC_VER #ifdef _MSC_VER
#if (_MSC_VER < 1800) /* only PRIOR to Visual Studio 2013 */
/* Needed define for Eigen */
//#define NOMINMAX
#include <limits>
template<typename T>
inline bool isnan(T value)
{
return value != value;
}
// requires #include <limits>
template<typename T>
inline bool isinf(T value)
{
return (value == std::numeric_limits<T>::infinity() || (-1 * value) == std::numeric_limits<T>::infinity()) && std::numeric_limits<T>::has_infinity;
}
#endif
#elif defined __APPLE__ #elif defined __APPLE__
#include <cmath> #include <cmath>
#ifndef isnan #ifndef isnan
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment