1 #ifndef CONVERSION_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
2 #define CONVERSION_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
4 #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
37 return input ==
".inf" || input ==
".Inf" || input ==
".INF" || input ==
"+.inf" || input ==
"+.Inf" || input ==
"+.INF";
41 return input ==
"-.inf" || input ==
"-.Inf" || input ==
"-.INF";
45 return input ==
".nan" || input ==
".NaN" || input ==
".NAN";
51 std::stringstream stream(input);
52 stream.unsetf(std::ios::dec);
53 if((stream >> output) && (stream >> std::ws).eof())
56 if(std::numeric_limits<T>::has_infinity) {
58 output = std::numeric_limits<T>::infinity();
61 output = -std::numeric_limits<T>::infinity();
66 if(std::numeric_limits<T>::has_quiet_NaN &&
IsNaN(input)) {
67 output = std::numeric_limits<T>::quiet_NaN();
75 #endif // CONVERSION_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM