Corrected return type of our versions of isfinite, isnan, and isinf (which use the boost implementations when the libc versions are not present)

release/4.3a0
Richard Roberts 2012-12-24 19:56:58 +00:00
parent c713e52355
commit 5e7df8cd23
1 changed files with 7 additions and 4 deletions

View File

@ -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 <boost/math/special_functions/fpclassify.hpp>
namespace std {
using boost::math::isfinite;
using boost::math::isnan;
using boost::math::isinf;
template<typename T> inline int isfinite(T a) {
return (int)boost::math::isfinite(a); }
template<typename T> inline int isnan(T a) {
return (int)boost::math::isnan(a); }
template<typename T> inline int isinf(T a) {
return (int)boost::math::isinf(a); }
}
#include <boost/math/constants/constants.hpp>