This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Moreover, in the implementation of __convert_to_v we have the pattern (for doubles, f.i.):
if (!(__err & ios_base::failbit)) { char* __sanity; errno = 0; double __d = __strtod_l(__s, &__sanity, __cloc); if (__sanity != __s && errno != ERANGE) __v = __d; else __err |= ios_base::failbit; }
That is, besides the first issue, we also check at the outset that the failbit is not set.
Ok, this second part, by itself, it's trivial: we just spare some work if the preceding _M_extract_float fails.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |