Merge branch 'dsdl_review'

This commit is contained in:
Pavel Kirienko
2015-03-27 00:05:46 +03:00
96 changed files with 636 additions and 392 deletions
@@ -470,6 +470,20 @@ inline bool isInfinity(T arg)
#endif
}
/**
* Replacement for std::isfinite().
* Note that direct float comparison (==, !=) is intentionally avoided.
*/
template <typename T>
inline bool isFinite(T arg)
{
#if UAVCAN_CPP_VERSION >= UAVCAN_CPP11
return std::isfinite(arg);
#else
return !isNaN(arg) && !isInfinity(arg);
#endif
}
/**
* Replacement for std::signbit().
* Note that direct float comparison (==, !=) is intentionally avoided.