473 bool _Bad =
false, _Neg =
false;
478 static constexpr
char _Src[] = {
"0123456789-"};
481 _Ctype_fac.
widen(&_Src[0], &_Src[
sizeof (_Src)], _Atoms);
483 for (
size_t _Off = 0; !_Bad && _Off < 4; ++_Off)
484 switch (_Pattern.
field[_Off])
492 && _First !=
_Last && *_First != *_Symbol.c_str())
494 else if (_Off == 3 && _Sign.size() <= 1
495 && (_First ==
_Last || *_First != *_Symbol.c_str()))
498 for (_Source = _Symbol.begin();
499 _First !=
_Last && _Source != _Symbol.end()
503 if (_Source != _Symbol.end())
511 else if (0 < (_Ppunct_fac->positive_sign()).
size()
512 && _Ppunct_fac->positive_sign()[0] == *_First)
515 _Sign = _Ppunct_fac->positive_sign();
517 else if (0 < (_Ppunct_fac->negative_sign()).
size()
518 && _Ppunct_fac->negative_sign()[0] == *_First)
521 _Sign = _Ppunct_fac->negative_sign();
524 else if (0 == (_Ppunct_fac->positive_sign()).
size())
526 else if (0 == (_Ppunct_fac->negative_sign()).
size())
532 int _Fracdigseen = 0;
533 int _Fracdigits = _Ppunct_fac->frac_digits();
534 const string _Grouping = _Ppunct_fac->grouping();
535 const _Elem _Kseparator = _Grouping.
size() == 0
536 ? (_Elem)0 : _Ppunct_fac->thousands_sep();
538 if (_Kseparator == (_Elem)0
540 for (; _First !=
_Last
546 string _Groups((
size_t)1,
'\0');
549 for (; _First !=
_Last; ++_First)
550 if ((_Idx =
_Find_elem(_Atoms, *_First)) < 10)
556 else if (_Groups[_Group] ==
'\0'
557 || *_First != _Kseparator)
561 _Groups.
append((
size_t)1,
'\0');
567 else if (
'\0' < _Groups[_Group])
572 for (
const char *_Pg = _Grouping.
c_str();
573 !_Bad && 0 < _Group; )
576 else if ((0 < --_Group && *_Pg != _Groups[_Group])
577 || (0 == _Group && *_Pg < _Groups[_Group]))
579 else if (
'\0' < _Pg[1])
585 const _Elem _Point = _Ppunct_fac->decimal_point();
587 && _Point != (_Elem)0
588 && *_First == _Point)
590 while (++_First !=
_Last
591 && _Fracdigseen < _Fracdigits
598 if (_Fracdigseen < _Fracdigits)
602 if (_Val.
size() == 0)
605 for (; _Fracdigseen < _Fracdigits; ++_Fracdigseen)
618 for (; _First !=
_Last
626 if (!_Bad && 1 < _Sign.size())
630 for (_Source = _Sign.begin(); ++_Source != _Sign.end()
633 if (_Source != _Sign.end())
640 _Val.
insert((
size_t)0, (
size_t)1,
'-');
_Mybase::const_iterator const_iterator
Definition: xstring:1887
moneypunct< _Elem, true > _Mypunct1
Definition: xlocmon:353
constexpr auto size(const _Container &_Cont) -> decltype(_Cont.size())
Definition: xutility:1477
_Ret_z_ const _Elem * c_str() const _NOEXCEPT
Definition: xstring:3001
#define _DEBUG_RANGE(first, last)
Definition: xutility:902
bool __CLR_OR_THIS_CALL is(mask _Maskval, _Elem _Ch) const
Definition: xlocale:2083
#define _USE(loc, fac)
Definition: xlocale:499
iterator insert(const const_iterator _Where, const initializer_list< _Elem > _Ilist)
Definition: xstring:2204
moneypunct< _Elem, false > _Mypunct0
Definition: xlocmon:352
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:432
_Source
Definition: corecrt_wstring.h:187
fmtflags __CLR_OR_THIS_CALL flags() const
Definition: xiosbase:375
_Myt & append(initializer_list< _Elem > _Ilist)
Definition: xstring:2199
basic_string< _Elem, char_traits< _Elem >, allocator< _Elem > > string_type
Definition: xlocmon:359
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *terminate_handler)()
_In_ size_t _Out_opt_ int _In_z_ unsigned char const * _Src
Definition: mbstring.h:1039
size_t _Find_elem(_Elem *_Base, _Elem _Ch)
Definition: xlocnum:88
_Myt & erase(const size_type _Off=0)
Definition: xstring:2584
static constexpr _Fmtflags showbase
Definition: xiosbase:58
_Elem __CLR_OR_THIS_CALL widen(char _Byte) const
Definition: xlocale:2126
char field[4]
Definition: xlocmon:28
#define CHAR_MAX
Definition: limits.h:24
size_type size() const _NOEXCEPT
Definition: xstring:3023
_FwdIt const _Ty _Val
Definition: algorithm:1938
_FwdIt _Last
Definition: algorithm:1936