From 5e7df8cd234d78eac326b883e194ae1441816ae1 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Mon, 24 Dec 2012 19:56:58 +0000 Subject: [PATCH] Corrected return type of our versions of isfinite, isnan, and isinf (which use the boost implementations when the libc versions are not present) --- gtsam/base/types.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gtsam/base/types.h b/gtsam/base/types.h index 6d4cb192f..88e59507c 100644 --- a/gtsam/base/types.h +++ b/gtsam/base/types.h @@ -85,13 +85,16 @@ namespace gtsam { #ifdef _MSC_VER -// Define some common g++ functions and macros that MSVC does not have +// Define some common g++ functions and macros we use that MSVC does not have #include namespace std { - using boost::math::isfinite; - using boost::math::isnan; - using boost::math::isinf; + template inline int isfinite(T a) { + return (int)boost::math::isfinite(a); } + template inline int isnan(T a) { + return (int)boost::math::isnan(a); } + template inline int isinf(T a) { + return (int)boost::math::isinf(a); } } #include