742{
744
745 if (*_number ==
__T(
'\0') || iswspace((wint_t)*_number)) {
746 throw new NumericConvertException(_number, 0, 0);
747 }
748
749 NumericConvertException::Error error = NumericConvertException::NoError;
750 errno = 0;
751 wchar_t* endptr =
NULL;
752 float n = wcstof(_number, &endptr);
753 if (errno == ERANGE) {
754 if (+HUGE_VALF == n || -HUGE_VALF == n) {
755 error = NumericConvertException::Overflow;
756 }
757 else if (!(FLT_MIN < n)) {
758 error = NumericConvertException::Underflow;
759 }
760 }
761
762 if (NumericConvertException::NoError != error) {
763 throw new NumericConvertException(
764 error,
765 _number,
766 0
767 );
768 }
769
770 if ((endptr && *endptr != '\0') || errno == EINVAL) {
771 throw new NumericConvertException(
772 _number,
773 0,
774 endptr ? (endptr - _number) : 0
775 );
776 }
777
778 return (float) n;
779}
#define __DCL_ASSERT(expr)