203 in_.setstate(std::ios_base::failbit);
207 std::map<std::string, T> inf_nan_map;
209 inf_nan_map[
"INF"] = std::numeric_limits<T>::infinity();
210 inf_nan_map[
"+INF"] = std::numeric_limits<T>::infinity();
211 inf_nan_map[
"-INF"] = - std::numeric_limits<T>::infinity();
212 inf_nan_map[
"INFINITY"] = std::numeric_limits<T>::infinity();
213 inf_nan_map[
"+INFINITY"] = std::numeric_limits<T>::infinity();
214 inf_nan_map[
"-INFINITY"] = - std::numeric_limits<T>::infinity();
215 inf_nan_map[
"NAN"] = std::numeric_limits<T>::quiet_NaN();
216 inf_nan_map[
"+NAN"] = std::numeric_limits<T>::quiet_NaN();
217 inf_nan_map[
"-NAN"] = - std::numeric_limits<T>::quiet_NaN();
219 inf_nan_map[
"1.#INF"] = std::numeric_limits<T>::infinity();
220 inf_nan_map[
"-1.#INF"] = - std::numeric_limits<T>::infinity();
221 inf_nan_map[
"1.#QNAN"] = std::numeric_limits<T>::quiet_NaN();
222 inf_nan_map[
"-1.#QNAN"] = - std::numeric_limits<T>::quiet_NaN();
224 std::transform(str.begin(), str.end(), str.begin(), ::toupper);
226 if (inf_nan_map.find(str) != inf_nan_map.end()) {
227 *x = inf_nan_map[str];
229 in_.setstate(std::ios_base::failbit);
bool RemainderIsOnlySpaces()