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