Jouni K Seppanen <jks@...278...> writes:
#include <math.h>
template<typename T> int mpl_isnan(T arg) { return isnan(arg); }
#include <cmath>
Nah, that also effectively assumes the GNU libraries. Here's a better
idea:
#include <math.h>
int mpl_isnan_f(float f) { return isnan(f); }
int mpl_isnan_d(double f) { return isnan(f); }
int mpl_isnan_ld(long double f) { return isnan(f); }
Compile this as C(99), not C++, and put
extern "C" {
int mpl_isnan_f(float);
int mpl_isnan_d(double);
int mpl_isnan_ld(long double);
}
in the C++ file.
···
--
Jouni