#pragma once
#ifndef _XLOCNUM_
#define _XLOCNUM_
#ifndef RC_INVOKED
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <streambuf>
#pragma pack(push,_CRT_PACKING)
#pragma warning(push,_STL_WARNING_LEVEL)
#pragma warning(disable: _STL_DISABLED_WARNINGS)
#pragma warning(disable:
4455
4494
4619
4643
4702
4984
4988
)
_STL_DISABLE_CLANG_WARNINGS
#pragma push_macro("new")
#undef new
#if !defined(MRTDLL) && !defined(_M_CEE_PURE)
_EXTERN_C
#endif /* !defined(MRTDLL) etc. */
extern _CRTIMP2_PURE float __CLRCALL_PURE_OR_CDECL _Stofx(const char *,
extern
float
__cdecl
(
const
char
*,
_Out_opt_ _Deref_post_opt_valid_ char **,
long
,
int
*);
extern _CRTIMP2_PURE double __CLRCALL_PURE_OR_CDECL _Stodx(const char *,
extern
double
__cdecl
(
const
char
*,
_Out_opt_ _Deref_post_opt_valid_ char **,
long
,
int
*);
extern _CRTIMP2_PURE long double __CLRCALL_PURE_OR_CDECL _Stoldx(const char *,
extern
long
double
__cdecl
(
const
char
*,
_Out_opt_ _Deref_post_opt_valid_ char **,
long
,
int
*);
extern _CRTIMP2_PURE long __CLRCALL_PURE_OR_CDECL _Stolx(const char *,
extern
long
__cdecl
(
const
char
*,
_Out_opt_ _Deref_post_opt_valid_ char **,
int
,
int
*);
extern _CRTIMP2_PURE unsigned long __CLRCALL_PURE_OR_CDECL _Stoulx(const char *,
extern
unsigned
long
__cdecl
(
const
char
*,
_Out_opt_ _Deref_post_opt_valid_ char **,
int
,
int
*);
extern _CRTIMP2_PURE long long __CLRCALL_PURE_OR_CDECL _Stollx(const char *,
extern
long
long
__cdecl
(
const
char
*,
_Out_opt_ _Deref_post_opt_valid_ char **,
int
,
int
*);
extern _CRTIMP2_PURE unsigned long long __CLRCALL_PURE_OR_CDECL _Stoullx(const char *,
extern
unsigned
long
long
__cdecl
(
const
char
*,
_Out_opt_ _Deref_post_opt_valid_ char **,
int
,
int
*);
#if !defined(MRTDLL) && !defined(_M_CEE_PURE)
_END_EXTERN_C
#endif /* !defined(MRTDLL) etc. */
}
inline
double
(
const
char
*
,
char
**
,
int
,
int
*
)
{
int& _Errno_ref = errno; // Nonzero cost, pay it once
const
int
=
_Errno_ref
;
_Errno_ref
=
0
;
double _Val = _CSTD strtod(_Str, _Endptr);
*
=
_Errno_ref
;
_Errno_ref
=
_Orig
;
if
(
0
)
_Val *= _CSTD pow(10.0, static_cast<double>(_Pten));
_Val
*= ::
(
10.0
,
static_cast
<
double
>(
));
return
(
_Val
);
}
inline
float
(
const
char
*
,
char
**
,
int
,
int
*
)
{
int& _Errno_ref = errno; // Nonzero cost, pay it once
const
int
=
_Errno_ref
;
_Errno_ref
=
0
;
float _Val = _CSTD strtof(_Str, _Endptr);
*
=
_Errno_ref
;
_Errno_ref
=
_Orig
;
if
(
0
)
_Val *= _CSTD powf(10.0f, static_cast<float>(_Pten));
_Val
*= ::
(
10.0f
,
static_cast
<
float
>(
));
return
(
_Val
);
}
template
<
class
,
>
inline
(
const
(&
)[
],
const
)
{
return
(
static_cast
<
>(
(
,
+ (
-
1
),
) -
));
}
inline
wchar_t
*
(
const
wchar_t
*
)
{
const size_t _Count = _CSTD wcslen(_Ptr) + 1;
wchar_t
*
= (
wchar_t
*)
(
_Count
,
sizeof
(
wchar_t
),
_CRT_BLOCK, __FILE__, __LINE__);
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xlocnum"
,
101
);
if
(!
_Ptrdest
)
();
_CSTD wmemcpy(_Ptrdest, _Ptr, _Count);
return
(
_Ptrdest
);
}
template
<
class
>
class
:
public
::
{
public
:
typedef
<
,
<
>,
<
> >
;
typedef
;
__PURE_APPDOMAIN_GLOBAL _CRTIMP2_PURE_IMPORT static locale::id id; // unique facet id
__declspec
(dllimport)
static
::
;
()
const
{
return
(
());
}
()
const
{
return
(
());
}
()
const
{
return
(
());
}
()
const
{
return
(
());
}
()
const
{
return
(
());
}
explicit
(
=
0
)
:
::
(
)
{
(
_Lobj
);
if
(
==
0
)
=
(
','
,
static_cast
<
*>(
nullptr
),
_Lobj
.
());
}
(
const
&
,
=
0
,
bool
=
false
)
:
::
(
)
{
(
,
);
}
static
(
const
::
**
=
nullptr
,
const
*
=
nullptr
)
{
if
(
!=
nullptr
&& *
==
nullptr
)
*
=
new
<
>(
(
->
()),
0
,
true
);
}
protected
:
virtual __CLR_OR_THIS_CALL ~numpunct() noexcept
{
();
}
(
const
char
*
,
=
0
,
bool
=
false
)
:
::
(
)
{
_BEGIN_LOCINFO(_Lobj(_Locname))
(
_Lobj
,
);
}
template
<
class
>
void
(
,
const
*
,
::
)
{
=
(
->
[
0
],
static_cast
<
*>(
nullptr
),
);
=
(
->
[
0
],
static_cast
<
*>(
nullptr
),
);
}
void
(
wchar_t
,
const
*
,
::
)
{
= (
)
->
[
0
];
= (
)
->
[
0
];
}
void
(
const
&
,
bool
=
false
)
{
const
*
=
.
();
::
=
.
();
=
nullptr
;
=
nullptr
;
=
nullptr
;
=
(
?
""
:
_Ptr
->
,
static_cast
<
char
*>(
nullptr
),
.
());
=
(
.
(),
static_cast
<
*>(
nullptr
),
_Cvt
);
=
(
.
(),
static_cast
<
*>(
nullptr
),
_Cvt
);
();
if
(
)
{
=
(
'.'
,
static_cast
<
*>(
nullptr
),
_Cvt
);
=
(
','
,
static_cast
<
*>(
nullptr
),
_Cvt
);
}
else
((
)
0
,
_Ptr
,
_Cvt
);
}
virtual _Elem __CLR_OR_THIS_CALL do_decimal_point() const
{
return
(
);
}
virtual _Elem __CLR_OR_THIS_CALL do_thousands_sep() const
{
return
(
);
}
virtual string __CLR_OR_THIS_CALL do_grouping() const
{
return
(
(
));
}
virtual string_type __CLR_OR_THIS_CALL do_falsename() const
{
return
(
(
));
}
virtual string_type __CLR_OR_THIS_CALL do_truename() const
{
return
(
(
));
}
private
:
void
()
{
_CSTD free((void *)_Grouping);
_CSTD free((void *)_Falsename);
_CSTD free((void *)_Truename);
}
const
char
*
;
;
;
const
*
;
const
*
;
};
template
<
class
>
class
:
public
<
>
{
public
:
explicit
(
const
char
*
,
=
0
)
:
<
>(
,
)
{
}
explicit
(
const
&
,
=
0
)
:
<
>(
.
(),
)
{
}
protected
:
virtual __CLR_OR_THIS_CALL ~numpunct_byname() noexcept
{
}
};
#if !(defined _CRTBLD && defined MSVC_SUPPLEMENTAL_2) // TRANSITION, VSO#578955
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdllimport-static-field-def"
#endif /* __clang__ */
template
<
class
>
__PURE_APPDOMAIN_GLOBAL locale::id numpunct<_Elem>::id;
#ifdef __clang__
#pragma clang diagnostic pop
#endif /* __clang__ */
#endif /* !(defined _CRTBLD && defined MSVC_SUPPLEMENTAL_2) */
template
<
class
,
class
=
<
,
<
> > >
class
:
public
::
{
public
:
static size_t __CLRCALL_OR_CDECL _Getcat(const locale::facet **_Ppf = nullptr,
static
__cdecl
(
const
::
**
=
nullptr
,
const
*
=
nullptr
)
{
if
(
!=
nullptr
&& *
==
nullptr
)
*
=
new
<
,
>(
(
->
()));
}
__PURE_APPDOMAIN_GLOBAL static locale::id id; // unique facet id
protected
:
virtual __CLR_OR_THIS_CALL ~num_get() noexcept
{
}
void
(
const
&)
{
}
public
:
explicit __CLR_OR_THIS_CALL num_get(size_t _Refs = 0)
:
::
(
)
{
(
_Lobj
);
}
__CLR_OR_THIS_CALL num_get(const _Locinfo& _Lobj, size_t _Refs = 0)
:
::
(
)
{
(
);
}
typedef
;
typedef
;
_InIt __CLR_OR_THIS_CALL get(_InIt _First, _InIt _Last,
&
,
::
&
,
bool
&
)
const
{
return
(
(
,
,
,
,
));
}
_InIt __CLR_OR_THIS_CALL get(_InIt _First, _InIt _Last,
&
,
::
&
,
unsigned
short
&
)
const
{
return
(
(
,
,
,
,
));
}
_InIt __CLR_OR_THIS_CALL get(_InIt _First, _InIt _Last,
&
,
::
&
,
unsigned
int
&
)
const
{
return
(
(
,
,
,
,
));
}
_InIt __CLR_OR_THIS_CALL get(_InIt _First, _InIt _Last,
&
,
::
&
,
long
&
)
const
{
return
(
(
,
,
,
,
));
}
_InIt __CLR_OR_THIS_CALL get(_InIt _First, _InIt _Last,
&
,
::
&
,
unsigned
long
&
)
const
{
return
(
(
,
,
,
,
));
}
_InIt __CLR_OR_THIS_CALL get(_InIt _First, _InIt _Last,
&
,
::
&
,
long
long
&
)
const
{
return
(
(
,
,
,
,
));
}
_InIt __CLR_OR_THIS_CALL get(_InIt _First, _InIt _Last,
&
,
::
&
,
unsigned
long
long
&
)
const
{
return
(
(
,
,
,
,
));
}
_InIt __CLR_OR_THIS_CALL get(_InIt _First, _InIt _Last,
&
,
::
&
,
float
&
)
const
{
return
(
(
,
,
,
,
));
}
_InIt __CLR_OR_THIS_CALL get(_InIt _First, _InIt _Last,
&
,
::
&
,
double
&
)
const
{
return
(
(
,
,
,
,
));
}
_InIt __CLR_OR_THIS_CALL get(_InIt _First, _InIt _Last,
&
,
::
&
,
long
double
&
)
const
{
return
(
(
,
,
,
,
));
}
_InIt __CLR_OR_THIS_CALL get(_InIt _First, _InIt _Last,
&
,
::
&
,
void
*&
)
const
{
return
(
(
,
,
,
,
));
}
protected
:
virtual _InIt __CLR_OR_THIS_CALL do_get(_InIt _First, _InIt _Last,
&
,
::
&
,
bool
&
)
const
{
(
,
);
if
(
.
() &
::
)
{
const auto& _Punct_fac = _STD use_facet<numpunct<_Elem>>(_Iosbase.getloc());
const
auto
&
= ::
std
::
<
<
>>(
.
());
<
>
(
static_cast
<
>(
1
),
{});
_Str
_Punct_fac
.
();
_Str
.
(
{});
_Str
_Punct_fac
.
();
switch
(
(
,
,
2
,
_Str
.
()))
{
case
0
:
=
false
;
break
;
case
1
:
=
true
;
break
;
default
:
=
false
;
=
::
;
break
;
}
}
else
{
const
int
=
(
_Ac
,
,
,
.
(),
.
());
if
(
_Ac
[
0
]
'\0'
)
{
=
false
;
=
::
;
}
else
{
char
*
;
int
;
const long _Ans = _CSTD _Stolx(_Ac, &_Ep, _Base, &_Errno); // convert
const
long
= ::
(
_Ac
, &
_Ep
,
_Base
, &
_Errno
);
if
(
_Ep
_Ac
||
_Errno
0
)
{
=
true
;
=
::
;
}
else
{
=
_Ans
0
;
if
(
_Ans
0
&&
_Ans
1
)
{
=
::
;
}
}
}
}
if
(
==
)
{
|=
::
;
}
return
(
);
}
virtual _InIt __CLR_OR_THIS_CALL do_get(_InIt _First, _InIt _Last,
&
,
::
&
,
unsigned
short
&
)
const
{
(
,
);
const
int
=
(
_Ac
,
,
,
.
(),
.
());
if
(
_Ac
[
0
]
'\0'
)
{
=
::
;
=
0
;
}
else
{
const
bool
=
_Ac
[
0
]
'-'
;
const
char
*
=
_Ac
;
if
(
_Minus
)
{
++
_Digits
;
}
char
*
;
int
;
const unsigned long _Tmp = _CSTD _Stoulx(_Digits, &_Ep, _Base, &_Errno); // convert
const
unsigned
long
= ::
(
_Digits
, &
_Ep
,
_Base
, &
_Errno
);
=
static_cast
<
unsigned
short
>(
_Tmp
);
if (_Ep == _Digits || _Errno != 0 || _Tmp > USHRT_MAX)
if
(
_Ep
_Digits
||
_Errno
0
||
_Tmp
>
0xffff
)
{
=
::
;
}
else
if
(
_Minus
)
{
=
static_cast
<
unsigned
short
>(
0
-
);
}
}
if
(
==
)
{
|=
::
;
}
return
(
);
}
virtual _InIt __CLR_OR_THIS_CALL do_get(_InIt _First, _InIt _Last,
&
,
::
&
,
unsigned
int
&
)
const
{
static_assert
(
sizeof
(
unsigned
int
)
sizeof
(
unsigned
long
),
"Bad overflow assumptions due to sizeof(unsigned int) != sizeof(unsigned long)"
);
unsigned
long
;
=
::
(
,
,
,
,
_Tmp
);
=
_Tmp
;
return
(
);
}
virtual _InIt __CLR_OR_THIS_CALL do_get(_InIt _First, _InIt _Last,
&
,
::
&
,
long
&
)
const
{
(
,
);
const
int
=
(
_Ac
,
,
,
.
(),
.
());
if
(
_Ac
[
0
]
'\0'
)
{
=
::
;
=
0
;
}
else
{
char
*
;
int
;
_Val = _CSTD _Stolx(_Ac, &_Ep, _Base, &_Errno); // convert
= ::
(
_Ac
, &
_Ep
,
_Base
, &
_Errno
);
if
(
_Ep
_Ac
||
_Errno
0
)
{
=
::
;
}
}
if
(
==
)
{
|=
::
;
}
return
(
);
}
virtual _InIt __CLR_OR_THIS_CALL do_get(_InIt _First, _InIt _Last,
&
,
::
&
,
unsigned
long
&
)
const
{
(
,
);
const
int
=
(
_Ac
,
,
,
.
(),
.
());
if
(
_Ac
[
0
]
'\0'
)
{
=
::
;
=
0
;
}
else
{
char
*
;
int
;
_Val = _CSTD _Stoulx(_Ac, &_Ep, _Base, &_Errno); // convert
= ::
(
_Ac
, &
_Ep
,
_Base
, &
_Errno
);
if
(
_Ep
_Ac
||
_Errno
0
)
{
=
::
;
}
}
if
(
==
)
{
|=
::
;
}
return
(
);
}
virtual _InIt __CLR_OR_THIS_CALL do_get(_InIt _First, _InIt _Last,
&
,
::
&
,
long
long
&
)
const
{
(
,
);
const
int
=
(
_Ac
,
,
,
.
(),
.
());
if
(
_Ac
[
0
]
'\0'
)
{
=
::
;
=
0
;
}
else
{
char
*
;
int
;
_Val = _CSTD _Stollx(_Ac, &_Ep, _Base, &_Errno); // convert
= ::
(
_Ac
, &
_Ep
,
_Base
, &
_Errno
);
if
(
_Ep
_Ac
||
_Errno
0
)
{
=
::
;
}
}
if
(
==
)
{
|=
::
;
}
return
(
);
}
virtual _InIt __CLR_OR_THIS_CALL do_get(_InIt _First, _InIt _Last,
&
,
::
&
,
unsigned
long
long
&
)
const
{
(
,
);
const
int
=
(
_Ac
,
,
,
.
(),
.
());
if
(
_Ac
[
0
]
'\0'
)
{
=
::
;
=
0
;
}
else
{
int
;
char
*
;
_Val = _CSTD _Stoullx(_Ac, &_Ep, _Base, &_Errno); // convert
= ::
(
_Ac
, &
_Ep
,
_Base
, &
_Errno
);
if
(
_Ep
_Ac
||
_Errno
0
)
{
=
::
;
}
}
if
(
==
)
{
|=
::
;
}
return
(
);
}
#define _ENABLE_V2_BEHAVIOR 1000000000
#define _FLOATING_BUFFER_SIZE (_MAX_EXP_DIG + _MAX_SIG_DIG_V2 + 16)
virtual _InIt __CLR_OR_THIS_CALL do_get(_InIt _First, _InIt _Last,
&
,
::
&
,
float
&
)
const
{
(
,
);
char _Ac[_FLOATING_BUFFER_SIZE];
int _Hexexp = _ENABLE_V2_BEHAVIOR;
const
int
=
(
_Ac
,
,
,
, &
_Hexexp
);
if
(
_Ac
[
0
]
'\0'
)
{
=
::
;
=
0.0f
;
}
else
{
int
;
char
*
;
=
(
_Ac
, &
_Ep
,
_Base
, &
_Errno
);
if
(
_Ep
_Ac
||
_Errno
0
)
{
=
::
;
=
0.0f
;
}
else if (_Hexexp != _ENABLE_V2_BEHAVIOR && _Hexexp != 0)
else
if
(
_Hexexp
1000000000
&&
_Hexexp
0
)
{
_Val = _CSTD ldexpf(_Val, 4 * _Hexexp);
}
}
if
(
==
)
{
|=
::
;
}
return
(
);
}
virtual _InIt __CLR_OR_THIS_CALL do_get(_InIt _First, _InIt _Last,
&
,
::
&
,
double
&
)
const
{
(
,
);
char _Ac[_FLOATING_BUFFER_SIZE];
int _Hexexp = _ENABLE_V2_BEHAVIOR;
const
int
=
(
_Ac
,
,
,
, &
_Hexexp
);
if
(
_Ac
[
0
]
'\0'
)
{
=
::
;
=
0.0
;
}
else
{
int
;
char
*
;
=
(
_Ac
, &
_Ep
,
_Base
, &
_Errno
);
if
(
_Ep
_Ac
||
_Errno
0
)
{
=
::
;
=
0.0
;
}
else if (_Hexexp != _ENABLE_V2_BEHAVIOR && _Hexexp != 0)
else
if
(
_Hexexp
1000000000
&&
_Hexexp
0
)
{
_Val = _CSTD ldexp(_Val, 4 * _Hexexp);
}
}
if
(
==
)
{
|=
::
;
}
return
(
);
}
#undef _FLOATING_BUFFER_SIZE
virtual _InIt __CLR_OR_THIS_CALL do_get(_InIt _First, _InIt _Last,
&
,
::
&
,
long
double
&
)
const
{
static_assert
(
sizeof
(
double
)
sizeof
(
long
double
),
"Bad assumption: sizeof(double) == sizeof(long double)."
);
double
;
=
::
(
,
,
,
,
_Result
);
=
_Result
;
return
(
);
}
virtual _InIt __CLR_OR_THIS_CALL do_get(_InIt _First, _InIt _Last,
&
,
::
&
,
void
*&
)
const
{
(
,
);
const
int
=
(
_Ac
,
,
,
::
,
.
());
if
(
_Ac
[
0
]
'\0'
)
{
=
::
;
=
nullptr
;
}
else
{
int
;
char
*
;
#ifdef _WIN64
_Val = reinterpret_cast<void *>(_CSTD _Stoullx(_Ac, &_Ep, _Base, &_Errno));
#else /* ^^^ _WIN64 ^^^ // vvv !_WIN64 vvv */
_Val = reinterpret_cast<void *>(_CSTD _Stoulx(_Ac, &_Ep, _Base, &_Errno));
#endif /* _WIN64 */
=
reinterpret_cast
<
void
*>(::
(
_Ac
, &
_Ep
,
_Base
, &
_Errno
));
if
(
_Ep
_Ac
||
_Errno
0
)
{
=
::
;
=
nullptr
;
}
}
if
(
==
)
{
|=
::
;
}
return
(
);
}
private
:
int __CLRCALL_OR_CDECL _Getifld(char *_Ac,
&
,
&
,
::
,
const
&
)
const
{
const auto& _Punct_fac = _STD use_facet<numpunct<_Elem>>(_Loc);
const
auto
&
= ::
std
::
<
<
>>(
);
const
=
_Punct_fac
.
();
const
=
_Grouping
.
()
0
? (
)
0
:
_Punct_fac
.
();
constexpr
int
=
22
;
constexpr
int
=
24
;
static
constexpr
char
[] = {
"0123456789ABCDEFabcdef-+Xx"
};
[
sizeof
(
_Src
)];
const ctype<_Elem>& _Ctype_fac = _STD use_facet<ctype<_Elem>>(_Loc);
const
<
>&
= ::
std
::
<
<
>>(
);
_Ctype_fac
.
(&
_Src
[
0
], &
_Src
[
sizeof
(
_Src
)],
_Atoms
);
char
*
=
;
if
(
!=
)
{
if
(*
==
_Atoms
[
_Numget_signoff
+
1
])
{
*
_Ptr
++ =
'+'
;
++
;
}
else
if
(*
==
_Atoms
[
_Numget_signoff
])
{
*
_Ptr
++ =
'-'
;
++
;
}
}
&=
::
;
int
=
::
?
8
:
::
?
16
:
::
?
0
:
10
;
bool
=
false
;
bool
=
false
;
if
(
!=
&& *
==
_Atoms
[
0
])
{
_Seendigit
=
true
;
++
;
if
(
!=
&& (*
==
_Atoms
[
_Numget_xoff
+
1
]
|| *
==
_Atoms
[
_Numget_xoff
])
&& (
_Base
0
||
_Base
16
))
{
_Base
=
16
;
_Seendigit
=
false
;
++
;
}
else
if
(
_Base
0
)
{
_Base
=
8
;
}
}
const
auto
=
static_cast
<
>(
_Base
0
||
_Base
10
?
10
:
_Base
8
?
8
:
16
+
6
);
((
)
1
, (
char
)
_Seendigit
);
=
0
;
for (char *const _Pe = &_Ac[_MAX_INT_DIG - 1];
for
(
char
*
const
= &
[
32
-
1
];
!=
; ++
)
{
=
(
_Atoms
, *
);
if
(
_Idx
_Dlen
)
{
*
_Ptr
=
_Src
[
_Idx
];
if
((
_Nonzero
|| *
_Ptr
'0'
) &&
_Ptr
_Pe
)
{
++
_Ptr
;
_Nonzero
=
true
;
}
_Seendigit
=
true
;
if (_Groups[_Group] != CHAR_MAX)
++
_Groups
_Group
];
}
else
if
(
_Groups
_Group
]
'\0'
||
_Kseparator
== (
)
0
|| *
!=
_Kseparator
)
break
;
else
{
_Groups
.
(
'\0'
);
++
_Group
;
}
}
if
(
_Group
0
)
{
if
(
'\0'
_Groups
_Group
])
{
++
_Group
;
}
else
{
_Seendigit
=
false
;
}
}
for
(
const
char
*
= &
_Grouping
0
];
_Seendigit
&&
0
<
_Group
; )
break
;
else
if
((
0
--
_Group
&& *
_Pg
_Groups
_Group
])
|| (
0
_Group
&& *
_Pg
_Groups
_Group
]))
_Seendigit
=
false
;
else
if
(
'\0'
_Pg
[
1
])
++
_Pg
;
if
(
_Seendigit
&& !
_Nonzero
)
*
_Ptr
++ =
'0'
;
else
if
(!
_Seendigit
)
_Ptr
=
;
*
_Ptr
=
'\0'
;
return
(
_Base
);
}
int __CLRCALL_OR_CDECL _Getffld(char *_Ac,
&
,
&
,
&
,
int
*
)
const
{
if
((
.
() &
::
) ==
::
)
return
(
(
,
,
,
,
));
const auto& _Punct_fac = _STD use_facet<numpunct<_Elem>>(_Iosbase.getloc());
const
auto
&
= ::
std
::
<
<
>>(
.
());
const
=
_Punct_fac
.
();
char
*
=
;
bool
=
false
;
bool
=
false
;
constexpr
int
=
10
;
constexpr
int
=
12
;
static
constexpr
char
[] = {
"0123456789-+Ee"
};
[
sizeof
(
_Src
)];
const ctype<_Elem>& _Ctype_fac = _STD use_facet<ctype<_Elem>>(_Iosbase.getloc());
const
<
>&
= ::
std
::
<
<
>>(
.
());
_Ctype_fac
.
(&
_Src
[
0
], &
_Src
[
sizeof
(
_Src
)],
_Atoms
);
if
(
!=
)
{
if
(*
==
_Atoms
[
_Numget_signoff
+
1
])
{
*
_Ptr
++ =
'+'
;
++
;
}
else
if
(*
==
_Atoms
[
_Numget_signoff
])
{
*
_Ptr
++ =
'-'
;
++
;
}
}
char
*
=
_Ptr
;
*
_Ptr
++ =
'0'
;
bool
=
false
;
int
=
0
;
int
=
0
;
;
const int _Max_sig_dig = (*_Phexexp == _ENABLE_V2_BEHAVIOR ? _MAX_SIG_DIG_V2 : _MAX_SIG_DIG_V1);
const
int
= (*
1000000000
?
768
:
36
);
const
char
*
= &
_Grouping
0
];
if (*_Pg == CHAR_MAX || *_Pg <= '\0')
if
(*
_Pg
127
|| *
_Pg
<=
'\0'
)
{
for
(;
!=
&& (
_Idx
=
(
_Atoms
, *
)) <
10
;
_Seendigit
=
true
, (
void
)++
)
{
if
(
_Max_sig_dig
<=
_Significant
)
{
++
_Pten
;
if
(
0
_Idx
)
{
_Sticky
=
true
;
}
}
else
if
(
_Idx
0
||
_Significant
0
)
{
*
_Ptr
++ =
_Src
[
_Idx
];
++
_Significant
;
}
}
}
else
{
const
=
_Grouping
.
()
0
? (
)
0
:
_Punct_fac
.
();
((
)
1
,
'\0'
);
=
0
;
for
(;
!=
; ++
)
{
if
((
_Idx
=
(
_Atoms
, *
))
10
)
{
_Seendigit
=
true
;
if
(
_Max_sig_dig
<=
_Significant
)
{
++
_Pten
;
if
(
0
_Idx
)
{
_Sticky
=
true
;
}
}
else
if
(
_Idx
0
||
_Significant
0
)
{
*
_Ptr
++ =
_Src
[
_Idx
];
++
_Significant
;
}
if (_Groups[_Group] != CHAR_MAX)
{
++
_Groups
_Group
];
}
}
else
if
(
_Groups
_Group
]
'\0'
||
_Kseparator
== (
)
0
|| *
!=
_Kseparator
)
{
break
;
}
else
{
_Groups
.
(
'\0'
);
++
_Group
;
}
}
if
(
_Group
0
)
{
if
(
'\0'
_Groups
_Group
])
{
++
_Group
;
}
else
{
_Bad
=
true
;
}
}
while
(!
_Bad
&&
0
<
_Group
)
{
{
break
;
}
if
((
0
--
_Group
&& *
_Pg
_Groups
_Group
])
|| (
0
_Group
&& *
_Pg
_Groups
_Group
]))
{
_Bad
=
true
;
}
else
if
(
'\0'
_Pg
[
1
])
{
++
_Pg
;
}
}
}
if
(
!=
&& *
==
_Punct_fac
.
())
{
*
_Ptr
++ =
()->
[
0
];
++
;
}
if (*_Phexexp != _ENABLE_V2_BEHAVIOR && _Significant == 0)
if
(*
1000000000
&&
_Significant
0
)
{
for
(;
!=
&& *
==
_Atoms
[
0
];
_Seendigit
=
true
, (
void
)++
)
--
_Pten
;
if
(
_Pten
0
)
{
*
_Ptr
++ =
'0'
;
++
_Pten
;
}
}
for
(;
!=
&& (
_Idx
=
(
_Atoms
, *
)) <
10
;
_Seendigit
=
true
, (
void
)++
)
if
(
_Significant
_Max_sig_dig
)
{
*
_Ptr
++ =
_Src
[
_Idx
];
++
_Significant
;
}
else
if
(
0
_Idx
)
_Sticky
=
true
;
if
(
_Sticky
)
{
char
*
=
_Ptr
;
while
(--
_Px
_Leading
)
{
if
(*
_Px
()->
[
0
])
{
if
(*
_Px
'9'
)
{
++*
_Px
;
break
;
}
*
_Px
=
'0'
;
}
}
if
(
_Px
_Leading
)
{
*
_Px
=
'1'
;
++
_Pten
;
}
}
if
(
_Seendigit
&&
!=
&& (*
==
_Atoms
[
_Numget_eoff
+
1
]
|| *
==
_Atoms
[
_Numget_eoff
]))
{
*
_Ptr
++ =
'e'
;
++
;
_Seendigit
=
false
;
_Significant
=
0
;
if
(
!=
)
{
if
(*
==
_Atoms
[
_Numget_signoff
+
1
])
{
*
_Ptr
++ =
'+'
;
++
;
}
else
if
(*
==
_Atoms
[
_Numget_signoff
])
{
*
_Ptr
++ =
'-'
;
++
;
}
}
for
(;
!=
&& *
==
_Atoms
[
0
]; ++
)
{
_Seendigit
=
true
;
}
if
(
_Seendigit
)
*
_Ptr
++ =
'0'
;
for
(;
!=
&& (
_Idx
=
(
_Atoms
, *
)) <
10
;
_Seendigit
=
true
, (
void
)++
)
if (_Significant < _MAX_EXP_DIG)
{
*
_Ptr
++ =
_Src
[
_Idx
];
++
_Significant
;
}
}
if
(
_Bad
|| !
_Seendigit
)
_Ptr
=
;
*
_Ptr
=
'\0'
;
return
(
_Pten
);
}
int __CLRCALL_OR_CDECL _Getffldx(char *_Ac,
&
,
&
,
&
,
int
*
)
const
{
const auto& _Punct_fac = _STD use_facet<numpunct<_Elem>>(_Iosbase.getloc());
const
auto
&
= ::
std
::
<
<
>>(
.
());
const
=
_Punct_fac
.
();
constexpr
int
=
22
;
constexpr
int
=
24
;
constexpr
int
=
26
;
static
constexpr
char
[] = {
"0123456789ABCDEFabcdef-+XxPp"
};
[
sizeof
(
_Src
)];
const ctype<_Elem>& _Ctype_fac = _STD use_facet<ctype<_Elem>>(_Iosbase.getloc());
const
<
>&
= ::
std
::
<
<
>>(
.
());
_Ctype_fac
.
(&
_Src
[
0
], &
_Src
[
sizeof
(
_Src
)],
_Atoms
);
char
*
=
;
bool
=
false
;
;
if
(
!=
)
{
if
(*
==
_Atoms
[
_Numget_signoff
+
1
])
{
*
_Ptr
++ =
'+'
;
++
;
}
else
if
(*
==
_Atoms
[
_Numget_signoff
])
{
*
_Ptr
++ =
'-'
;
++
;
}
}
*
_Ptr
++ =
'0'
;
*
_Ptr
++ =
'x'
;
bool
=
false
;
int
=
0
;
int
=
0
;
if
(
!=
&& *
==
_Atoms
[
0
])
{
if
(++
!=
&& (*
==
_Atoms
[
_Numget_xoff
+
1
]
|| *
==
_Atoms
[
_Numget_xoff
]))
{
++
;
}
else
{
_Seendigit
=
true
;
}
}
const int _Max_sig_dig = (*_Phexexp == _ENABLE_V2_BEHAVIOR ? _MAX_SIG_DIG_V2 : _MAX_SIG_DIG_V1);
const
int
= (*
1000000000
?
768
:
36
);
const
char
*
= &
_Grouping
0
];
if (*_Pg == CHAR_MAX || *_Pg <= '\0')
if
(*
_Pg
127
|| *
_Pg
<=
'\0'
)
{
for
(;
!=
&& (
_Idx
=
(
_Atoms
, *
)) <
_Numget_signoff
;
_Seendigit
=
true
, (
void
)++
)
{
if
(
_Max_sig_dig
<=
_Significant
)
{
++
_Phex
;
}
else
if
(
_Idx
0
||
_Significant
0
)
{
*
_Ptr
++ =
_Src
[
_Idx
];
++
_Significant
;
}
}
}
else
{
const
=
_Grouping
.
()
0
? (
)
0
:
_Punct_fac
.
();
((
)
1
,
'\0'
);
=
0
;
for
(;
!=
; ++
)
{
if
((
_Idx
=
(
_Atoms
, *
))
_Numget_signoff
)
{
_Seendigit
=
true
;
if
(
_Max_sig_dig
<=
_Significant
)
{
++
_Phex
;
}
else
if
(
_Idx
0
||
_Significant
0
)
{
*
_Ptr
++ =
_Src
[
_Idx
];
++
_Significant
;
}
if (_Groups[_Group] != CHAR_MAX)
{
++
_Groups
_Group
];
}
}
else
if
(
_Groups
_Group
]
'\0'
||
_Kseparator
== (
)
0
|| *
!=
_Kseparator
)
{
break
;
}
else
{
_Groups
.
(
'\0'
);
++
_Group
;
}
}
if
(
_Group
0
)
{
if
(
'\0'
_Groups
_Group
])
{
++
_Group
;
}
else
{
_Bad
=
true
;
}
}
while
(!
_Bad
&&
0
<
_Group
)
{
{
break
;
}
if
((
0
--
_Group
&& *
_Pg
_Groups
_Group
])
|| (
0
_Group
&& *
_Pg
_Groups
_Group
]))
{
_Bad
=
true
;
}
else
if
(
'\0'
_Pg
[
1
])
{
++
_Pg
;
}
}
}
if
(
_Seendigit
&&
_Significant
0
)
*
_Ptr
++ =
'0'
;
if
(
!=
&& *
==
_Punct_fac
.
())
{
*
_Ptr
++ =
()->
[
0
];
++
;
}
if
(
_Significant
0
)
{
for
(;
!=
&& *
==
_Atoms
[
0
];
_Seendigit
=
true
, (
void
)++
)
--
_Phex
;
if
(
_Phex
0
)
{
*
_Ptr
++ =
'0'
;
++
_Phex
;
}
}
for
(;
!=
&& (
_Idx
=
(
_Atoms
, *
)) <
_Numget_signoff
;
_Seendigit
=
true
, (
void
)++
)
if
(
_Significant
_Max_sig_dig
)
{
*
_Ptr
++ =
_Src
[
_Idx
];
++
_Significant
;
}
if
(
_Seendigit
&&
!=
&& (*
==
_Atoms
[
_Numget_poff
+
1
]
|| *
==
_Atoms
[
_Numget_poff
]))
{
*
_Ptr
++ =
'p'
;
++
;
_Seendigit
=
false
;
_Significant
=
0
;
if
(
!=
)
{
if
(*
==
_Atoms
[
_Numget_signoff
+
1
])
{
*
_Ptr
++ =
'+'
;
++
;
}
else
if
(*
==
_Atoms
[
_Numget_signoff
])
{
*
_Ptr
++ =
'-'
;
++
;
}
}
for
(;
!=
&& *
==
_Atoms
[
0
]; ++
)
{
_Seendigit
=
true
;
}
if
(
_Seendigit
)
*
_Ptr
++ =
'0'
;
for
(;
!=
&& (
_Idx
=
(
_Atoms
, *
)) <
_Numget_signoff
;
_Seendigit
=
true
, (
void
)++
)
if (_Significant < _MAX_EXP_DIG)
{
*
_Ptr
++ =
_Src
[
_Idx
];
++
_Significant
;
}
}
if
(
_Bad
|| !
_Seendigit
)
_Ptr
=
;
*
_Ptr
=
'\0'
;
*
=
_Phex
;
return
(
0
);
}
#undef _ENABLE_V2_BEHAVIOR
};
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdllimport-static-field-def"
#endif /* __clang__ */
template
<
class
,
class
>
__PURE_APPDOMAIN_GLOBAL locale::id num_get<_Elem, _InIt>::id;
#ifdef __clang__
#pragma clang diagnostic pop
#endif /* __clang__ */
template
<
class
,
class
=
<
,
<
> > >
class
:
public
::
{
public
:
static size_t __CLRCALL_OR_CDECL _Getcat(const locale::facet **_Ppf = nullptr,
static
__cdecl
(
const
::
**
=
nullptr
,
const
*
=
nullptr
)
{
if
(
!=
nullptr
&& *
==
nullptr
)
*
=
new
<
,
>(
(
->
()));
}
__PURE_APPDOMAIN_GLOBAL static locale::id id; // unique facet id
protected
:
virtual __CLR_OR_THIS_CALL ~num_put() noexcept
{
}
void __CLR_OR_THIS_CALL _Init(const _Locinfo&)
{
}
public
:
explicit __CLR_OR_THIS_CALL num_put(size_t _Refs = 0)
:
::
(
)
{
(
_Lobj
);
}
__CLR_OR_THIS_CALL num_put(const _Locinfo& _Lobj, size_t _Refs = 0)
:
::
(
)
{
(
);
}
typedef
;
typedef
;
_OutIt __CLR_OR_THIS_CALL put(_OutIt _Dest,
&
,
,
bool
)
const
{
return
(
(
,
,
,
));
}
_OutIt __CLR_OR_THIS_CALL put(_OutIt _Dest,
&
,
,
long
)
const
{
return
(
(
,
,
,
));
}
_OutIt __CLR_OR_THIS_CALL put(_OutIt _Dest,
&
,
,
unsigned
long
)
const
{
return
(
(
,
,
,
));
}
_OutIt __CLR_OR_THIS_CALL put(_OutIt _Dest,
&
,
,
long
long
)
const
{
return
(
(
,
,
,
));
}
_OutIt __CLR_OR_THIS_CALL put(_OutIt _Dest,
&
,
,
unsigned
long
long
)
const
{
return
(
(
,
,
,
));
}
_OutIt __CLR_OR_THIS_CALL put(_OutIt _Dest,
&
,
,
double
)
const
{
return
(
(
,
,
,
));
}
_OutIt __CLR_OR_THIS_CALL put(_OutIt _Dest,
&
,
,
long
double
)
const
{
return
(
(
,
,
,
));
}
_OutIt __CLR_OR_THIS_CALL put(_OutIt _Dest,
&
,
,
const
void
*
)
const
{
return
(
(
,
,
,
));
}
protected
:
virtual _OutIt __CLR_OR_THIS_CALL do_put(_OutIt _Dest,
&
,
,
bool
)
const
{
if
(!(
.
() &
::
))
return
(
(
,
,
, (
long
)
));
else
{
const auto& _Punct_fac = _STD use_facet<numpunct<_Elem>>(_Iosbase.getloc());
const
auto
&
= ::
std
::
<
<
>>(
.
());
<
>
;
if
(
)
_Str
.
(
_Punct_fac
.
());
else
_Str
.
(
_Punct_fac
.
());
=
.
() <=
0
|| (
)
.
() <=
_Str
.
()
?
0
: (
)
.
() -
_Str
.
();
if
((
.
() &
::
) !=
::
)
{
=
(
,
,
_Fillcount
);
_Fillcount
=
0
;
}
=
(
,
_Str
.
(),
_Str
.
());
.
(
0
);
return
(
(
,
,
_Fillcount
));
}
}
virtual _OutIt __CLR_OR_THIS_CALL do_put(_OutIt _Dest,
&
,
,
long
)
const
{
char _Buf[2 * _MAX_INT_DIG], _Fmt[6];
return
(
(
,
,
,
_Buf
,
static_cast<size_t>(_CSTD sprintf_s(_Buf, sizeof (_Buf), _Ifmt(_Fmt, "ld",
static_cast
<
>(::
(
_Buf
,
sizeof
(
_Buf
),
(
_Fmt
,
"ld"
,
.
()),
))));
}
virtual _OutIt __CLR_OR_THIS_CALL do_put(_OutIt _Dest,
&
,
,
unsigned
long
)
const
{
char _Buf[2 * _MAX_INT_DIG], _Fmt[6];
return
(
(
,
,
,
_Buf
,
static_cast<size_t>(_CSTD sprintf_s(_Buf, sizeof (_Buf), _Ifmt(_Fmt, "lu",
static_cast
<
>(::
(
_Buf
,
sizeof
(
_Buf
),
(
_Fmt
,
"lu"
,
.
()),
))));
}
virtual _OutIt __CLR_OR_THIS_CALL do_put(_OutIt _Dest,
&
,
,
long
long
)
const
{
char _Buf[2 * _MAX_INT_DIG], _Fmt[8];
return
(
(
,
,
,
_Buf
,
static_cast<size_t>(_CSTD sprintf_s(_Buf, sizeof (_Buf), _Ifmt(_Fmt, "Ld",
static_cast
<
>(::
(
_Buf
,
sizeof
(
_Buf
),
(
_Fmt
,
"Ld"
,
.
()),
))));
}
virtual _OutIt __CLR_OR_THIS_CALL do_put(_OutIt _Dest,
&
,
,
unsigned
long
long
)
const
{
char _Buf[2 * _MAX_INT_DIG], _Fmt[8];
return
(
(
,
,
,
_Buf
,
static_cast<size_t>(_CSTD sprintf_s(_Buf, sizeof (_Buf), _Ifmt(_Fmt, "Lu",
static_cast
<
>(::
(
_Buf
,
sizeof
(
_Buf
),
(
_Fmt
,
"Lu"
,
.
()),
))));
}
virtual _OutIt __CLR_OR_THIS_CALL do_put(_OutIt _Dest,
&
,
,
double
)
const
{
;
char
[
8
];
bool
= (
.
() &
::
)
==
::
;
=
.
() <=
0
&& !
_Isfixed
?
6
:
.
();
= (
)
_Precision
;
if (_Isfixed && 1e10 < _CSTD fabs(_Val))
if
(
_Isfixed
&&
1e10
::
(
))
{
int
;
(void)_CSTD frexp(_Val, &_Ptwo);
_Bufsize += _CSTD abs(_Ptwo) * 30103L / 100000L;
_Bufsize
+= ::
(
_Ptwo
) *
30103L
/
100000L
;
}
_Buf
.
(
_Bufsize
+
50
);
const auto _Ngen = static_cast<size_t>(_CSTD sprintf_s((char *)_Buf.c_str(), _Buf.size(),
const
auto
=
static_cast
<
>(::
((
char
*)
_Buf
.
(),
_Buf
.
(),
(
_Fmt
,
0
,
.
()), (
int
)
_Precision
,
));
return
(
(
,
,
,
_Buf
.
(),
_Ngen
));
}
virtual _OutIt __CLR_OR_THIS_CALL do_put(_OutIt _Dest,
&
,
,
long
double
)
const
{
;
char
[
8
];
bool
= (
.
() &
::
)
==
::
;
=
.
() <=
0
&& !
_Isfixed
?
6
:
.
();
= (
)
_Precision
;
if (_Isfixed && 1e10 < _CSTD fabsl(_Val))
if
(
_Isfixed
&&
1e10
::
(
))
{
int
;
(void)_CSTD frexpl(_Val, &_Ptwo);
_Bufsize += _CSTD abs(_Ptwo) * 30103L / 100000L;
_Bufsize
+= ::
(
_Ptwo
) *
30103L
/
100000L
;
}
_Buf
.
(
_Bufsize
+
50
);
const auto _Ngen = static_cast<size_t>(_CSTD sprintf_s((char *)_Buf.c_str(), _Buf.size(),
const
auto
=
static_cast
<
>(::
((
char
*)
_Buf
.
(),
_Buf
.
(),
(
_Fmt
,
'L'
,
.
()), (
int
)
_Precision
,
));
return
(
(
,
,
,
_Buf
.
(),
_Ngen
));
}
virtual _OutIt __CLR_OR_THIS_CALL do_put(_OutIt _Dest,
&
,
,
const
void
*
)
const
{
char _Buf[2 * _MAX_INT_DIG];
return
(
(
,
,
,
_Buf
,
static_cast<size_t>(_CSTD sprintf_s(_Buf, sizeof (_Buf), "%p", _Val))));
static_cast
<
>(::
(
_Buf
,
sizeof
(
_Buf
),
"%p"
,
))));
}
private
:
char *__CLRCALL_OR_CDECL _Ffmt(char *_Fmt,
char
,
::
)
const
{
char
*
=
;
*
_Ptr
++ =
'%'
;
if
(
&
::
)
*
_Ptr
++ =
'+'
;
if
(
&
::
)
*
_Ptr
++ =
'#'
;
*
_Ptr
++ =
'.'
;
*
_Ptr
++ =
'*'
;
if
(
'\0'
)
*
_Ptr
++ =
;
::
=
&
::
;
if
(
&
::
)
*
_Ptr
++ =
_Ffl
::
?
'f'
:
_Ffl
::
?
'A'
:
_Ffl
::
?
'E'
:
'G'
;
else
*
_Ptr
++ =
_Ffl
::
?
'f'
:
_Ffl
::
?
'a'
:
_Ffl
::
?
'e'
:
'g'
;
*
_Ptr
=
'\0'
;
return
(
);
}
_OutIt __CLRCALL_OR_CDECL _Fput(_OutIt _Dest,
&
,
,
const
char
*
,
)
const
{
auto
=
static_cast
<
>(
0
&& (*
'+'
|| *
'-'
));
const
char
*
;
if
((
.
() &
::
) !=
::
)
_Exps
=
"eE"
;
else
{
_Exps
=
"pP"
;
if
(
_Prefix
+
2
<=
&&
[
_Prefix
]
'0'
&& (
[
_Prefix
+
1
]
'x'
||
[
_Prefix
+
1
]
'X'
))
_Prefix
+=
2
;
}
const
=
_CSTD strcspn(&_Buf[0], _Exps); // find exponent
char
[
2
] = {
"."
};
_Dp[0] = _CSTD localeconv()->decimal_point[0];
const
=
_CSTD strcspn(&_Buf[0], &_Dp[0]); // find decimal point
const ctype<_Elem>& _Ctype_fac = _STD use_facet<ctype<_Elem>>(_Iosbase.getloc());
const
<
>&
= ::
std
::
<
<
>>(
.
());
<
>
(
,
(
0
));
_Ctype_fac
.
(&
[
0
], &
[
], &
_Groupstring
0
]);
const auto& _Punct_fac = _STD use_facet<numpunct<_Elem>>(_Iosbase.getloc());
const
auto
&
= ::
std
::
<
<
>>(
.
());
const
=
_Punct_fac
.
();
const
=
_Punct_fac
.
();
if
(
_Poff
)
_Groupstring
_Poff
] =
_Punct_fac
.
();
=
_Poff
?
_Eoff
:
_Poff
;
const
char
*
= &
_Grouping
0
];
while (*_Pg != CHAR_MAX && '\0' < *_Pg
while
(*
_Pg
127
&&
'\0'
*
_Pg
&& (
)*
_Pg
_Off
-
_Prefix
)
{
_Groupstring
.
(
_Off
-= *
_Pg
, (
)
1
,
_Kseparator
);
if
(
'\0'
_Pg
[
1
])
++
_Pg
;
}
=
_Groupstring
.
();
=
.
() <=
0
|| (
)
.
() <=
?
0
: (
)
.
() -
;
::
=
.
() &
::
;
if
(
_Adjustfield
::
&&
_Adjustfield
::
)
{
=
(
,
,
_Fillcount
);
_Fillcount
=
0
;
=
(
, &
_Groupstring
0
],
_Prefix
);
}
else
if
(
_Adjustfield
::
)
{
=
(
, &
_Groupstring
0
],
_Prefix
);
=
(
,
,
_Fillcount
);
_Fillcount
=
0
;
}
else
=
(
, &
_Groupstring
0
],
_Prefix
);
=
(
, &
_Groupstring
_Prefix
],
-
_Prefix
);
.
(
0
);
return
(
(
,
,
_Fillcount
));
}
char *__CLRCALL_OR_CDECL _Ifmt(char *_Fmt,
const
char
*
,
::
)
const
{
char
*
=
;
*
_Ptr
++ =
'%'
;
if
(
&
::
)
*
_Ptr
++ =
'+'
;
if
(
&
::
)
*
_Ptr
++ =
'#'
;
if
(
[
0
]
'L'
)
*
_Ptr
++ =
[
0
];
else
{
*
_Ptr
++ =
'I'
;
*
_Ptr
++ =
'6'
;
*
_Ptr
++ =
'4'
;
}
::
=
&
::
;
*
_Ptr
++ =
_Basefield
::
?
'o'
:
_Basefield
::
?
[
1
]
:
&
::
?
'X'
:
'x'
;
*
_Ptr
=
'\0'
;
return
(
);
}
_OutIt __CLRCALL_OR_CDECL _Iput(_OutIt _Dest,
&
,
,
char
*
,
)
const
{
auto
=
static_cast
<
>(
0
&& (*
'+'
|| *
'-'
));
if
((
.
() &
::
) ==
::
&&
_Prefix
+
2
<=
&&
[
_Prefix
] ==
'0'
&& (
[
_Prefix
+
1
]
'x'
||
[
_Prefix
+
1
]
'X'
))
{
_Prefix
+=
2
;
}
const ctype<_Elem>& _Ctype_fac = _STD use_facet<ctype<_Elem>>(_Iosbase.getloc());
const
<
>&
= ::
std
::
<
<
>>(
.
());
<
>
(
,
(
0
));
_Ctype_fac
.
(&
[
0
], &
[
], &
_Groupstring
0
]);
const auto& _Punct_fac = _STD use_facet<numpunct<_Elem>>(_Iosbase.getloc());
const
auto
&
= ::
std
::
<
<
>>(
.
());
const
=
_Punct_fac
.
();
const
char
*
= &
_Grouping
0
];
if (*_Pg != CHAR_MAX && '\0' < *_Pg)
if
(*
_Pg
127
&&
'\0'
*
_Pg
)
{
const
=
_Punct_fac
.
();
while (*_Pg != CHAR_MAX && '\0' < *_Pg
while
(*
_Pg
127
&&
'\0'
*
_Pg
&& (
)*
_Pg
-
_Prefix
)
{
-= *
_Pg
;
_Groupstring
.
(
,
1
,
_Kseparator
);
if
(
'\0'
_Pg
[
1
])
++
_Pg
;
}
}
=
_Groupstring
.
();
=
.
() <=
0
|| (
)
.
() <=
?
0
: (
)
.
() -
;
::
=
.
() &
::
;
if
(
_Adjustfield
::
&&
_Adjustfield
::
)
{
=
(
,
,
_Fillcount
);
_Fillcount
=
0
;
=
(
, &
_Groupstring
0
],
_Prefix
);
}
else
if
(
_Adjustfield
::
)
{
=
(
, &
_Groupstring
0
],
_Prefix
);
=
(
,
,
_Fillcount
);
_Fillcount
=
0
;
}
else
=
(
, &
_Groupstring
0
],
_Prefix
);
=
(
, &
_Groupstring
_Prefix
],
-
_Prefix
);
.
(
0
);
return
(
(
,
,
_Fillcount
));
}
_OutIt __CLRCALL_OR_CDECL _Put(_OutIt _Dest,
const
*
,
)
const
{
for
(;
0
; --
, (
void
)++
, ++
)
*
= *
;
return
(
);
}
_OutIt __CLRCALL_OR_CDECL _Rep(_OutIt _Dest,
,
)
const
{
for
(;
0
; --
, (
void
)++
)
*
=
;
return
(
);
}
};
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdllimport-static-field-def"
#endif /* __clang__ */
template
<
class
,
class
>
__PURE_APPDOMAIN_GLOBAL locale::id num_put<_Elem, _OutIt>::id;
#if defined(_DLL_CPPLIB)
#if !defined(_CRTBLD) || defined(__FORCE_INSTANCE)
template __PURE_APPDOMAIN_GLOBAL locale::id numpunct<char>::id;
template class _CRTIMP2_PURE_IMPORT num_get<char,
template
class
__declspec
(dllimport)
<
char
,
<
char
,
<
char
> > >;
template class _CRTIMP2_PURE_IMPORT num_put<char,
template
class
__declspec
(dllimport)
<
char
,
<
char
,
<
char
> > >;
template __PURE_APPDOMAIN_GLOBAL locale::id numpunct<wchar_t>::id;
template
::
<
wchar_t
>::id;
template class _CRTIMP2_PURE_IMPORT num_get<wchar_t,
template
class
__declspec
(dllimport)
<
wchar_t
,
<
wchar_t
,
<
wchar_t
> > >;
template class _CRTIMP2_PURE_IMPORT num_put<wchar_t,
template
class
__declspec
(dllimport)
<
wchar_t
,
<
wchar_t
,
<
wchar_t
> > >;
#endif /* !defined(_CRTBLD) || defined(__FORCE_INSTANCE) */
#ifdef __FORCE_INSTANCE
template __PURE_APPDOMAIN_GLOBAL locale::id numpunct<unsigned short>::id;
template class _CRTIMP2_PURE_IMPORT num_get<unsigned short,
istreambuf_iterator<unsigned short, char_traits<unsigned short> > >;
template class _CRTIMP2_PURE_IMPORT num_put<unsigned short,
ostreambuf_iterator<unsigned short, char_traits<unsigned short> > >;
#endif /* __FORCE_INSTANCE */
#endif /* defined(_DLL_CPPLIB) */
#ifdef __clang__
#pragma clang diagnostic pop
#endif /* __clang__ */
#pragma pop_macro("new")
_STL_RESTORE_CLANG_WARNINGS
#pragma warning(pop)
#pragma warning(pop)
#pragma pack(pop)
#endif /* RC_INVOKED */
#endif /* _XLOCNUM_ */
#pragma pack(pop)