From: baldurk Date: Thu, 13 Oct 2016 17:28:54 +0000 (+0200) Subject: Add std::isnan and std::isinf wrappers for VS2010 that doesn't have them X-Git-Tag: upstream/11.4.0~1444^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a65fc269c4b50f01400e64140b96377d6b11d95;p=platform%2Fupstream%2Fglslang.git Add std::isnan and std::isinf wrappers for VS2010 that doesn't have them --- diff --git a/SPIRV/hex_float.h b/SPIRV/hex_float.h index ea403a7..24a2607 100644 --- a/SPIRV/hex_float.h +++ b/SPIRV/hex_float.h @@ -23,6 +23,19 @@ #include #include +#if defined(_MSC_VER) && _MSC_VER < 1700 +namespace std { +bool isnan(double f) +{ + return ::_isnan(f) != 0; +} +bool isinf(double f) +{ + return ::_finite(f) == 0; +} +} +#endif + #include "bitutils.h" namespace spvutils {