From 1a65fc269c4b50f01400e64140b96377d6b11d95 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 13 Oct 2016 19:28:54 +0200 Subject: [PATCH] Add std::isnan and std::isinf wrappers for VS2010 that doesn't have them --- SPIRV/hex_float.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/SPIRV/hex_float.h b/SPIRV/hex_float.h index ea403a77..24a26079 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 {