#ifndef TESTS_IS_QUIET_NAN_H
#define TESTS_IS_QUIET_NAN_H
namespace flatbuffers {
namespace tests {
#if defined(FLATBUFFERS_HAS_NEW_STRTOD) && (FLATBUFFERS_HAS_NEW_STRTOD > 0)
template<typename T, typename U, U qnan_base> bool is_quiet_nan_impl(T v) { … }
# if defined(__mips__) || defined(__hppa__)
inline bool is_quiet_nan(float v) {
return is_quiet_nan_impl<float, uint32_t, 0x7FC00000u>(v) ||
is_quiet_nan_impl<float, uint32_t, 0x7FBFFFFFu>(v);
}
inline bool is_quiet_nan(double v) {
return is_quiet_nan_impl<double, uint64_t, 0x7FF8000000000000ul>(v) ||
is_quiet_nan_impl<double, uint64_t, 0x7FF7FFFFFFFFFFFFu>(v);
}
# else
inline bool is_quiet_nan(float v) { … }
inline bool is_quiet_nan(double v) { … }
# endif
#endif
}
}
#endif