#pragma once
#ifndef _XLOCALE_
#define _XLOCALE_
#ifndef RC_INVOKED
#include <climits>
#include <cstring>
#include <stdexcept>
#include <typeinfo>
#include <xlocinfo>
#include <memory>
#include <xfacet>
#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
template
<
class
>
class
{
public
:
_PGLOBAL static const int collate = _M_COLLATE;
static
const
int
= ((
1
<< (
1
)) >>
1
);
_PGLOBAL static const int ctype = _M_CTYPE;
static
const
int
= ((
1
<< (
2
)) >>
1
);
_PGLOBAL static const int monetary = _M_MONETARY;
static
const
int
= ((
1
<< (
3
)) >>
1
);
_PGLOBAL static const int numeric = _M_NUMERIC;
static
const
int
= ((
1
<< (
4
)) >>
1
);
_PGLOBAL static const int time = _M_TIME;
static
const
int
= ((
1
<< (
5
)) >>
1
);
_PGLOBAL static const int messages = _M_MESSAGES;
static
const
int
= ((
1
<< (
6
)) >>
1
);
_PGLOBAL static const int all = _M_ALL;
static
const
int
= (((
1
<< ((
6
+
1
))) >>
1
) -
1
);
_PGLOBAL static const int none = 0;
};
template
<
class
>
const
int
<
>::
;
template
<
class
>
const
int
<
>::
;
template
<
class
>
const
int
<
>::
;
template
<
class
>
const
int
<
>::
;
template
<
class
>
const
int
<
>::
;
template
<
class
>
const
int
<
>::
;
template
<
class
>
const
int
<
>::
;
template
<
class
>
const
int
<
>::
;
class
;
template
<
class
>
const _Facet& __CRTDECL use_facet(const locale&);
const
&
__cdecl
(
const
&);
template
<
class
>
class
;
struct _CRTIMP2_PURE_IMPORT _Crt_new_delete
struct
__declspec
(dllimport)
{
#ifdef _DEBUG
void * __CLRCALL_OR_CDECL operator new(size_t _Size)
{
void
*
=
,
nothrow
);
if
(!
_Ptr
)
();
return
(
_Ptr
);
}
void * __CLRCALL_OR_CDECL operator new(size_t _Size, const nothrow_t&) noexcept
void
*
__cdecl
(
,
const
&)
noexcept
{
return (_malloc_dbg(_Size > 0 ? _Size : 1, _CRT_BLOCK, __FILE__, __LINE__));
return
(
(
>
0
?
:
1
,
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xlocale"
,
75
));
}
void __CLRCALL_OR_CDECL operator delete(void * _Ptr) noexcept
void
__cdecl
(
void
*
)
noexcept
{
}
void __CLRCALL_OR_CDECL operator delete(void * _Ptr, const nothrow_t&) noexcept
void
__cdecl
(
void
*
,
const
&)
noexcept
{
);
}
void * __CLRCALL_OR_CDECL operator new(size_t, void *_Ptr) noexcept
void
*
__cdecl
(
,
void
*
)
noexcept
{
return
(
);
}
void __CLRCALL_OR_CDECL operator delete(void *, void *) noexcept
void
__cdecl
(
void
*,
void
*)
noexcept
{
}
#endif /* _DEBUG */
};
class
:
public
<
int
>,
public
{
public
:
typedef
int
;
class _CRTIMP2_PURE_IMPORT id
class
__declspec
(dllimport)
{
public
:
__CLR_OR_THIS_CALL id(size_t _Val = 0)
: _Id(
)
{
}
__CLR_OR_THIS_CALL operator size_t()
{
if
(
0
)
{
_BEGIN_LOCK(_LOCK_LOCALE)
if
(
0
)
{
=
static_cast
<
>(++
);
}
}
return
(
);
}
private
:
;
__PURE_APPDOMAIN_GLOBAL static int _Id_cnt;
public
:
__CLR_OR_THIS_CALL id(const id&) = delete;
id& __CLR_OR_THIS_CALL operator=(const id&) = delete;
};
class
;
class _CRTIMP2_PURE_IMPORT facet
class
__declspec
(dllimport)
:
public
,
public
{
public
:
static size_t __CLRCALL_OR_CDECL _Getcat(const facet ** = nullptr,
static
__cdecl
(
const
** =
nullptr
,
const
* =
nullptr
)
{
return
(
static_cast
<
>(-
1
));
}
virtual void __CLR_OR_THIS_CALL _Incref() override
{
_MT_INCR(_Myrefs);
(
reinterpret_cast
<
volatile
long
*>(&
));
}
virtual _Facet_base *__CLR_OR_THIS_CALL _Decref() override
{
if (_MT_DECR(_Myrefs) == 0)
if
(
(
reinterpret_cast
<
volatile
long
*>(&
))
0
)
{
return
(
this
);
}
return
(
nullptr
);
}
private
:
;
protected
:
explicit __CLR_OR_THIS_CALL facet(size_t _Initrefs = 0)
: _Myrefs(
static_cast
<
>(
))
{
}
virtual __CLR_OR_THIS_CALL ~facet() noexcept
{
}
public
:
__CLR_OR_THIS_CALL facet(const facet&) = delete;
facet& __CLR_OR_THIS_CALL operator=(const facet&) = delete;
};
class _CRTIMP2_PURE_IMPORT _Locimp
class
__declspec
(dllimport)
:
public
{
protected
:
__CLR_OR_THIS_CALL ~_Locimp() noexcept
{
(
this
);
}
private
:
static _MRTIMP2_PURE_NPURE _Locimp *__CLRCALL_PURE_OR_CDECL
(
bool
=
false
);
static _MRTIMP2_PURE_NPURE _Locimp *__CLRCALL_PURE_OR_CDECL
(
const
&
);
static _MRTIMP2_PURE_NPURE void __CLRCALL_PURE_OR_CDECL
(
*);
static _MRTIMP2_PURE_NPURE void __CLRCALL_PURE_OR_CDECL
(
*,
*,
);
static void __CLRCALL_PURE_OR_CDECL
(
*,
const
&);
friend
locale;
__CLR_OR_THIS_CALL _Locimp(bool _Transparent)
:
::
(
1
), _Facetvec(
nullptr
), _Facetcount(
0
),
_Catmask(
), _Xparent(
),
_Name(
"*"
)
{
}
__CLR_OR_THIS_CALL _Locimp(const _Locimp& _Right)
:
::
(
1
), _Facetvec(
nullptr
), _Facetcount(
.
),
_Catmask(
.
), _Xparent(
.
),
_Name(
.
.
())
{
(
this
,
);
}
void __CLR_OR_THIS_CALL _Addfac(facet *_Pfacet, size_t _Id)
{
(
this
,
,
);
}
static _Locimp *__CLRCALL_OR_CDECL _Makeloc(const _Locinfo&,
static
*
__cdecl
(
const
&,
,
*,
const
*);
static void __CLRCALL_OR_CDECL _Makewloc(const _Locinfo&,
static
void
__cdecl
(
const
&,
,
*,
const
*);
#ifdef _NATIVE_WCHAR_T_DEFINED
static void __CLRCALL_OR_CDECL _Makeushloc(const _Locinfo&,
static
void
__cdecl
(
const
&,
,
*,
const
*);
#endif /* _NATIVE_WCHAR_T_DEFINED */
static void __CLRCALL_OR_CDECL _Makexloc(const _Locinfo&,
static
void
__cdecl
(
const
&,
,
*,
const
*);
**
;
;
;
bool
;
<
char
>
;
__PURE_APPDOMAIN_GLOBAL static _Locimp *_Clocptr;
public
:
_Locimp& __CLR_OR_THIS_CALL operator=(const _Locimp&) = delete;
};
template
<
class
,
class
,
class
>
bool
(
const
<
,
,
>&
,
const
<
,
,
>&
)
const
{
const auto& _Coll_fac = use_facet<_STD collate<_Elem>>(*this);
const
auto
&
=
<::
std
::
<
>>(*
this
);
return
(
_Coll_fac
.
(
.
(),
.
() +
.
(),
.
(),
.
() +
.
())
0
);
}
template
<
class
>
(
const
&
)
const
{
*
;
_Facptr
= (
*)&
<
>(
);
(
"locale::combine facet missing"
);
*
=
::
(*
);
_Newimp
->
(
_Facptr
,
::id);
_Newimp
->
=
;
_Newimp
->
"*"
;
return
(
(
_Newimp
));
}
template
<
class
>
(
const
&
,
const
*
)
: _Ptr(
::
(*
.
))
{
if
(
!=
nullptr
)
{
->
((
*)
,
::id);
->
=
;
->
"*"
;
}
}
(
)
{
}
(
const
&
)
noexcept
: _Ptr(
.
)
{
->
();
}
()
noexcept
: _Ptr(
(
true
))
{
}
#if !defined(MRTDLL) || !defined(_CRTBLD)
(
const
&
,
const
&
,
)
: _Ptr(
::
(*
.
))
{
if
(
)
{
::
(
_Lobj
,
,
, &
);
_Lobj
.
(
.
->
,
.
().
());
_Lobj
.
(
.
->
,
.
().
());
->
=
.
->
|
.
->
;
->
_Lobj
.
();
delete
->
();
}
}
private
:
void
(
const
&
,
)
{
bool
=
false
;
();
if
(
)
{
_BEGIN_LOCINFO(_Lobj(_Cat, _Str.c_str()))
if
(
(
_Lobj
))
_Bad
=
true
;
else
{
::
(
_Lobj
,
,
,
nullptr
);
->
=
;
->
.
();
}
delete
->
();
}
if
(
_Bad
)
{
delete
->
();
(
"bad locale name"
);
}
}
public
:
explicit
(
const
char
*
,
=
)
: _Ptr(
::
())
{
if
(
==
nullptr
)
(
"bad locale name"
);
(
,
);
}
(
const
&
,
const
char
*
,
)
: _Ptr(
::
(*
.
))
{
if
(
==
nullptr
)
(
"bad locale name"
);
(
,
);
}
explicit
(
const
&
,
=
)
: _Ptr(
::
())
{
(
,
);
}
(
const
&
,
const
&
,
)
: _Ptr(
::
(*
.
))
{
(
,
);
}
#endif /* !MRTDLL || !_CRTBLD */
()
noexcept
{
if
(
!=
nullptr
)
delete
->
();
}
&
(
const
&
)
noexcept
{
if
(
.
)
{
delete
->
();
=
.
;
->
();
}
return
(*
this
);
}
()
const
{
return
(
==
nullptr
?
() :
->
.
());
}
_Ret_z_ const char *c_str() const
{
return
(
==
nullptr
?
""
:
->
.
());
}
const
*
(
)
const
{
const
*
=
->
?
->
[
] :
nullptr
;
if
(
_Facptr
!=
nullptr
|| !
->
)
return
(
_Facptr
);
else
{
::
*
=
();
return
(
_Ptr0
->
?
_Ptr0
->
[
]
:
nullptr
);
}
}
_NODISCARD bool operator==(const locale& _Loc) const
{
return
(
.
|| (
().
(
"*"
)
0
&&
().
(
.
())
0
));
}
_NODISCARD bool operator!=(const locale& _Right) const
{
return
(!(*
this
));
}
static _MRTIMP2_PURE const locale& __CLRCALL_PURE_OR_CDECL
();
static _MRTIMP2_PURE locale __CLRCALL_PURE_OR_CDECL
(
const
&);
static _MRTIMP2_PURE locale __CLRCALL_PURE_OR_CDECL
();
private
:
(
*
)
: _Ptr(
)
{
}
static _MRTIMP2_PURE _Locimp *__CLRCALL_PURE_OR_CDECL
(
bool
=
false
);
static _MRTIMP2_PURE _Locimp *__CLRCALL_PURE_OR_CDECL
();
static _MRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL
(
void
*);
bool
(
const
&
)
{
return (_CSTD strcmp(_Lobj._Getname(), "*") == 0);
return
(::
(
.
(),
"*"
)
0
);
}
*
;
};
template
<
class
>
struct
{
__PURE_APPDOMAIN_GLOBAL static const locale::facet *_Psave;
};
template
<
class
>
__PURE_APPDOMAIN_GLOBAL const locale::facet *_Facetptr<_Facet>::
=
nullptr
;
template
<
class
>
inline
const _Facet& __CRTDECL use_facet(const locale& _Loc)
const
&
__cdecl
(
const
&
)
{
_BEGIN_LOCK(_LOCK_LOCALE) // the thread lock, make get atomic
const
::
*
=
<
>::
;
const
=
::id;
const
::
*
=
.
(
_Id
);
if
(
_Pf
==
nullptr
)
{
if
(
_Psave
!=
nullptr
)
{
_Pf
=
_Psave
;
}
else
if
(
::_Getcat(&
_Psave
, &
) ==
static_cast
<
>(-
1
))
{
#if _HAS_EXCEPTIONS
_THROW(bad_cast{}); // lazy disallowed
#else /* _HAS_EXCEPTIONS */
abort(); // lazy disallowed
#endif /* _HAS_EXCEPTIONS */
}
else
{
auto
=
const_cast
<
::
*>(
_Psave
);
<
>
(
static_cast
<
*>(
_Pfmod
));
#if defined(_M_CEE)
_Facet_Register_m(_Pfmod);
#else /* defined(_M_CEE) */
(
_Pfmod
);
#endif /* defined(_M_CEE) */
_Pfmod
->
();
<
>::
=
_Psave
;
_Pf
=
_Psave
;
(
void
)
_Psave_guard
.
();
}
}
return
(
static_cast
<
const
&>(*
_Pf
));
}
template
<
class
,
class
>
inline
int __CRTDECL _Getloctxt(_InIt& _First, _InIt& _Last, size_t _Numfields,
const
*
)
{
for
(
=
0
;
[
_Off
] != (
)
0
; ++
_Off
)
if
(
[
_Off
] ==
[
0
])
++
;
(
,
'\0'
);
int
= -
2
;
for
(
=
1
; ; ++
_Column
, (
void
)++
,
_Ans
= -
1
)
{
bool
=
false
;
=
0
;
=
0
;
for
(;
_Field
; ++
_Field
)
{
while
(
[
_Off
] != (
)
0
&&
[
_Off
] !=
[
0
])
{
++
_Off
;
}
if
(
_Str
_Field
]
'\0'
)
{
_Off
+=
_Str
_Field
];
}
else
if
(
[
_Off
+=
_Column
] ==
[
0
] ||
[
_Off
] == (
)
0
)
{
_Str
_Field
] = (
char
)(
_Column
127
?
_Column
:
127
);
_Ans
= (
int
)
_Field
;
}
else
if
(
==
||
[
_Off
] != *
)
{
_Str
_Field
] = (
char
)(
_Column
127
?
_Column
:
127
);
}
else
{
_Prefix
=
true
;
}
}
if
(!
_Prefix
||
==
)
break
;
}
return
(
_Ans
);
}
template
<
class
>
inline
char __CRTDECL _Maklocbyte(_Elem _Char,
const
::
&)
{
return
((
char
)(
unsigned
char
)
);
}
template
<>
inline
char __CRTDECL _Maklocbyte(wchar_t _Char,
const
::
&
)
{
char
=
'\0'
;
= {};
(&
_Byte
,
, &
_Mbst1
, &
);
return
(
_Byte
);
}
#ifdef _NATIVE_WCHAR_T_DEFINED
template
<>
inline
char __CRTDECL _Maklocbyte(unsigned short _Char,
char
__cdecl
(
unsigned
short
,
const
::
&
)
{
char
=
'\0'
;
= {};
(&
_Byte
, (
wchar_t
)
, &
_Mbst1
, &
);
return
(
_Byte
);
}
#endif /* _NATIVE_WCHAR_T_DEFINED */
template
<
class
>
inline
_Elem __CRTDECL _Maklocchr(char _Byte, _Elem *,
const
::
&)
{
return
((
)(
unsigned
char
)
);
}
template
<>
inline
wchar_t __CRTDECL _Maklocchr(char _Byte, wchar_t *,
wchar_t
__cdecl
(
char
,
wchar_t
*,
const
::
&
)
{
wchar_t
=
L'\0'
;
= {};
(&
_Wc
, &
,
1
, &
_Mbst1
, &
);
return
(
_Wc
);
}
#ifdef _NATIVE_WCHAR_T_DEFINED
template
<>
inline
unsigned short __CRTDECL _Maklocchr(char _Byte, unsigned short *,
unsigned
short
__cdecl
(
char
,
unsigned
short
*,
const
::
&
)
{
unsigned
short
= (
unsigned
short
)
0
;
= {};
((
wchar_t
*)&
_Wc
, &
,
1
, &
_Mbst1
, &
);
return
(
_Wc
);
}
#endif /* _NATIVE_WCHAR_T_DEFINED */
template
<
class
>
inline
_Elem *__CRTDECL _Maklocstr(const char *_Ptr, _Elem *,
*
__cdecl
(
const
char
*
,
*,
const
::
&)
{
size_t _Count = _CSTD strlen(_Ptr) + 1;
*
= (
*)
(
_Count
,
sizeof
(
),
_CRT_BLOCK, __FILE__, __LINE__);
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xlocale"
,
668
);
if
(!
_Ptrdest
)
();
for
(
*
=
_Ptrdest
;
0
_Count
; --
_Count
, ++
_Ptrnext
, ++
)
*
_Ptrnext
= (
)(
unsigned
char
)*
;
return
(
_Ptrdest
);
}
template
<>
inline
wchar_t *__CRTDECL _Maklocstr(const char *_Ptr, wchar_t *,
wchar_t
*
__cdecl
(
const
char
*
,
wchar_t
*,
const
::
&
)
{
,
;
;
const
char
*
;
int
;
wchar_t
;
= {};
_Count1 = _CSTD strlen(_Ptr) + 1;
for
(
_Count
=
_Count1
,
_Wchars
=
0
,
_Ptr1
=
;
0
_Count
;
_Count
-=
_Bytes
,
_Ptr1
+=
_Bytes
, ++
_Wchars
)
if
((
_Bytes
=
(&
_Wc
,
_Ptr1
,
_Count
, &
_Mbst1
, &
)) <=
0
)
break
;
++
_Wchars
;
wchar_t
*
= (
wchar_t
*)
(
_Wchars
,
sizeof
(
wchar_t
),
_CRT_BLOCK, __FILE__, __LINE__);
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xlocale"
,
698
);
if
(!
_Ptrdest
)
();
wchar_t
*
=
_Ptrdest
;
= {};
for
(;
0
_Wchars
;
_Count
-=
_Bytes
,
+=
_Bytes
, --
_Wchars
, ++
_Ptrnext
)
if
((
_Bytes
=
(
_Ptrnext
,
,
_Count1
, &
_Mbst2
, &
)) <=
0
)
break
;
*
_Ptrnext
=
L'\0'
;
return
(
_Ptrdest
);
}
#ifdef _NATIVE_WCHAR_T_DEFINED
template
<>
inline
unsigned short *__CRTDECL _Maklocstr(const char *_Ptr, unsigned short *,
unsigned
short
*
__cdecl
(
const
char
*
,
unsigned
short
*,
const
::
&
)
{
,
;
;
const
char
*
;
int
;
unsigned
short
;
= {};
_Count1 = _CSTD strlen(_Ptr) + 1;
for
(
_Count
=
_Count1
,
_Wchars
=
0
,
_Ptr1
=
;
0
_Count
;
_Count
-=
_Bytes
,
_Ptr1
+=
_Bytes
, ++
_Wchars
)
{
if
((
_Bytes
=
((
wchar_t
*)&
_Wc
,
_Ptr1
,
_Count
, &
_Mbst1
, &
)) <=
0
)
{
break
;
}
}
++
_Wchars
;
wchar_t
*
= (
wchar_t
*)
(
_Wchars
,
sizeof
(
wchar_t
),
_CRT_BLOCK, __FILE__, __LINE__);
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xlocale"
,
740
);
if
(!
_Ptrdest
)
{
();
}
wchar_t
*
=
_Ptrdest
;
= {};
for
(;
0
_Wchars
;
_Count
-=
_Bytes
,
+=
_Bytes
, --
_Wchars
, ++
_Ptrnext
)
{
if
((
_Bytes
=
(
_Ptrnext
,
,
_Count1
, &
_Mbst2
, &
)) <=
0
)
{
break
;
}
}
*
_Ptrnext
=
L'\0'
;
return
((
unsigned
short
*)
_Ptrdest
);
}
#endif /* _NATIVE_WCHAR_T_DEFINED */
class _CRTIMP2_PURE_IMPORT codecvt_base
class
__declspec
(dllimport)
:
public
::
{
public
:
enum
{
,
,
,
};
typedef
int
;
__CLR_OR_THIS_CALL codecvt_base(size_t _Refs = 0)
:
::
(
)
{
}
bool __CLR_OR_THIS_CALL always_noconv() const noexcept
{
return
(
());
}
int __CLR_OR_THIS_CALL max_length() const noexcept
{
return
(
());
}
int __CLR_OR_THIS_CALL encoding() const noexcept
{
return
(
());
}
__CLR_OR_THIS_CALL ~codecvt_base() noexcept
{
}
protected
:
virtual bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept
virtual
bool
()
const
noexcept
{
return
(
false
);
}
virtual int __CLR_OR_THIS_CALL do_max_length() const noexcept
virtual
int
()
const
noexcept
{
return
(
1
);
}
virtual int __CLR_OR_THIS_CALL do_encoding() const noexcept
virtual
int
()
const
noexcept
{
return
(
1
);
}
};
template
<
class
,
class
,
class
>
class
:
public
{
public
:
typedef
;
typedef
;
typedef
;
result __CLR_OR_THIS_CALL in(_Statype& _State,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
return
(
(
,
,
,
,
,
,
));
}
result __CLR_OR_THIS_CALL out(_Statype& _State,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
return
(
(
,
,
,
,
,
,
));
}
result __CLR_OR_THIS_CALL unshift(_Statype& _State,
*
,
*
,
*&
)
const
{
return
(
(
,
,
,
));
}
int __CLR_OR_THIS_CALL length(_Statype& _State, const _Byte *_First1,
const
*
,
)
const
{
return
(
(
,
,
,
));
}
__PURE_APPDOMAIN_GLOBAL static locale::id id; // unique facet id
explicit __CLR_OR_THIS_CALL codecvt(size_t _Refs = 0)
:
(
)
{
(
());
}
__CLR_OR_THIS_CALL codecvt(const _Locinfo& _Lobj, size_t _Refs = 0)
:
(
)
{
(
);
}
static size_t __CLRCALL_OR_CDECL _Getcat(const locale::facet **_Ppf = nullptr,
static
__cdecl
(
const
::
**
=
nullptr
,
const
*
=
nullptr
)
{
if
(
!=
nullptr
&& *
==
nullptr
)
*
=
new
<
,
,
>(
(
->
()));
}
protected
:
virtual __CLR_OR_THIS_CALL ~codecvt() noexcept
{
}
void __CLR_OR_THIS_CALL _Init(const _Locinfo&)
{
}
virtual bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept
virtual
bool
()
const
noexcept
{
return
(
<
,
>);
}
virtual result __CLR_OR_THIS_CALL do_in(_Statype&,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
=
;
=
;
if
(
<
,
>)
{
return
(
);
}
for
(;
&&
; ++
, ++
)
{
*
= (
)*
;
}
return
(
);
}
virtual result __CLR_OR_THIS_CALL do_out(_Statype&,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
=
;
=
;
if
(
<
,
>)
{
return
(
);
}
for
(;
&&
; ++
, ++
)
{
*
= (
)*
;
}
return
(
);
}
virtual result __CLR_OR_THIS_CALL do_unshift(_Statype&,
*
,
*,
*&
)
const
{
=
;
return
(
);
}
virtual int __CLR_OR_THIS_CALL do_length(_Statype&, const _Byte *_First1,
const
*
,
)
const
{
return
(
static_cast
<
int
>(
(
,
static_cast
<
>(
-
))));
}
};
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdllimport-static-field-def"
#endif /* __clang__ */
template
<
class
,
class
,
class
>
__PURE_APPDOMAIN_GLOBAL locale::id codecvt<_Elem, _Byte, _Statype>::id;
#ifdef __clang__
#pragma clang diagnostic pop
#endif /* __clang__ */
enum
{
=
4
,
=
2
};
template
<>
class _CRTIMP2_PURE_IMPORT codecvt<char16_t, char, _Mbstatet>
class
__declspec
(dllimport)
<
char16_t
,
char
,
>
:
public
{
public
:
typedef
<
char16_t
,
char
,
>
;
typedef
char16_t
;
typedef
char
;
typedef
;
typedef
;
typedef
;
typedef
;
result __CLR_OR_THIS_CALL in(_Statype& _State,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
return
(
(
,
,
,
,
,
,
));
}
result __CLR_OR_THIS_CALL out(_Statype& _State,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
return
(
(
,
,
,
,
,
,
));
}
result __CLR_OR_THIS_CALL unshift(_Statype& _State,
*
,
*
,
*&
)
const
{
return
(
(
,
,
,
));
}
int __CLR_OR_THIS_CALL length(_Statype& _State, const _Byte *_First1,
const
*
,
)
const
{
return
(
(
,
,
,
));
}
__PURE_APPDOMAIN_GLOBAL static locale::id id;
explicit __CLR_OR_THIS_CALL codecvt(size_t _Refs = 0)
:
(
), _Maxcode(
0x10ffff
), _Mode(
)
{
(
_Lobj
);
}
__CLR_OR_THIS_CALL codecvt(const _Locinfo& _Lobj, size_t _Refs = 0)
:
(
), _Maxcode(
0x10ffff
), _Mode(
)
{
(
);
}
__CLR_OR_THIS_CALL codecvt(const _Locinfo& _Lobj, unsigned long _Maxcode_arg,
(
const
&
,
unsigned
long
,
,
=
0
)
:
(
), _Maxcode(
), _Mode(
)
{
(
);
}
static size_t __CLRCALL_OR_CDECL _Getcat(const locale::facet **_Ppf = nullptr,
static
__cdecl
(
const
::
**
=
nullptr
,
const
*
=
nullptr
)
{
if
(
!=
nullptr
&& *
==
nullptr
)
{
*
=
new
<
,
,
>(
(
->
()));
}
}
protected
:
virtual __CLR_OR_THIS_CALL ~codecvt() noexcept
{
}
void __CLR_OR_THIS_CALL _Init(const _Locinfo&)
{
}
virtual result __CLR_OR_THIS_CALL do_in(_Statype& _State,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
unsigned
short
*
= (
unsigned
short
*)&
;
=
;
=
;
while
(
&&
)
{
unsigned
char
= (
unsigned
char
)*
;
unsigned
long
;
int
,
;
if
(*
_Pstate
>
1
)
{
if
(
_By
0x80
||
0xc0
<=
_By
)
{
return
(
::
);
}
++
;
*
++ = (
)(*
_Pstate
| (
_By
&
0x3f
));
*
_Pstate
=
1
;
continue
;
}
if
(
_By
0x80
)
{
_Ch
=
_By
;
_Nextra
=
0
;
}
else
if
(
_By
0xc0
)
{
++
;
return
(
::
);
}
else
if
(
_By
0xe0
)
{
_Ch
=
static_cast
<
unsigned
long
>(
_By
&
0x1f
);
_Nextra
=
1
;
}
else
if
(
_By
0xf0
)
{
_Ch
=
static_cast
<
unsigned
long
>(
_By
&
0x0f
);
_Nextra
=
2
;
}
else
if
(
_By
0xf8
)
{
_Ch
=
static_cast
<
unsigned
long
>(
_By
&
0x07
);
_Nextra
=
3
;
}
else
{
_Ch
=
static_cast
<
unsigned
long
>(
_By
&
0x03
);
_Nextra
=
_By
0xfc
?
4
:
5
;
}
_Nskip
=
_Nextra
3
?
0
:
1
;
=
;
if
(
_Nextra
0
)
{
++
;
}
else
if
(
-
_Nextra
+
1
-
_Nskip
)
{
break
;
}
else
{
for
(++
;
_Nskip
_Nextra
; --
_Nextra
, ++
)
{
if
((
_By
= (
unsigned
char
)*
)
0x80
||
0xc0
<=
_By
)
{
return
(
::
);
}
else
{
_Ch
=
_Ch
<<
6
| (
_By
&
0x3f
);
}
}
}
if
(
0
_Nskip
)
{
_Ch
<<=
6
;
}
if
((
0x10ffff
?
:
0x10ffff
)
_Ch
)
{
return
(
::
);
}
if
(
0xffff
_Ch
)
{
unsigned
short
=
(
unsigned
short
)(
0xd800
| (
_Ch
>>
10
) -
0x0040
);
*
++ = (
)
_Ch0
;
*
_Pstate
= (
unsigned
short
)(
0xdc00
| (
_Ch
&
0x03ff
));
continue
;
}
if
(
_Nskip
0
)
{
if
(
)
{
=
;
break
;
}
if
((
_By
= (
unsigned
char
)*
++)
0x80
||
0xc0
<=
_By
)
{
return
(
::
);
}
_Ch
|=
_By
&
0x3f
;
}
if
(*
_Pstate
0
)
{
*
_Pstate
=
1
;
if
((
&
) !=
0
&&
_Ch
==
0xfeff
)
{
const
=
(
,
,
,
,
,
,
);
if
(
_Ans
::
)
{
*
_Pstate
=
0
;
=
;
}
return
(
_Ans
);
}
}
*
++ = (
)
_Ch
;
}
return
(
?
::
:
::
);
}
virtual result __CLR_OR_THIS_CALL do_out(_Statype& _State,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
unsigned
short
*
= (
unsigned
short
*)&
;
=
;
=
;
while
(
&&
)
{
unsigned
long
;
const
unsigned
short
= (
unsigned
short
)*
;
bool
=
false
;
if
(
1
*
_Pstate
)
{
if
(
_Ch1
0xdc00
||
0xe000
<=
_Ch1
)
return
(
::
);
_Ch
=
static_cast
<
unsigned
long
>((*
_Pstate
<<
10
) | (
_Ch1
-
0xdc00
));
}
else
if
(
0xd800
<=
_Ch1
&&
_Ch1
0xdc00
)
{
_Ch
=
static_cast
<
unsigned
long
>((
_Ch1
-
0xd800
+
0x0040
) <<
10
);
_Save
=
true
;
}
else
_Ch
=
_Ch1
;
;
int
;
if
(
_Ch
0x0080
)
{
_By
= (
)
_Ch
;
_Nextra
=
0
;
}
else
if
(
_Ch
0x0800
)
{
_By
= (
)(
0xc0
|
_Ch
>>
6
);
_Nextra
=
1
;
}
else
if
(
_Ch
0x10000
)
{
_By
= (
)(
0xe0
|
_Ch
>>
12
);
_Nextra
=
2
;
}
else
{
_By
= (
)(
0xf0
|
_Ch
>>
18
);
_Nextra
=
3
;
}
int
=
_Nextra
3
?
_Nextra
+
1
:
_Save
?
1
:
3
;
if
(
-
_Nput
)
{
break
;
}
if
(*
_Pstate
0
&& (
&
) !=
0
)
{
if
(
-
3
+
_Nput
)
{
break
;
}
*
++ = (
)(
unsigned
char
)
0xef
;
*
++ = (
)(
unsigned
char
)
0xbb
;
*
++ = (
)(
unsigned
char
)
0xbf
;
}
++
;
if
(
_Save
||
_Nextra
3
)
{
*
++ =
_By
;
--
_Nput
;
}
for
(;
0
_Nput
; --
_Nput
)
{
*
++ = (
)((
_Ch
>>
6
* --
_Nextra
&
0x3f
) |
0x80
);
}
*
_Pstate
= (
unsigned
short
)(
_Save
?
_Ch
>>
10
:
1
);
}
return
(
?
::
:
::
);
}
virtual result __CLR_OR_THIS_CALL do_unshift(_Statype& _State,
*
,
*,
*&
)
const
{
unsigned
short
*
= (
unsigned
short
*)&
;
=
;
return
(
1
*
_Pstate
?
::
:
::
);
}
virtual int __CLR_OR_THIS_CALL do_length(_Statype& _State, const _Byte *_First1,
virtual
int
(
&
,
const
*
,
const
*
,
)
const
{
=
0
;
=
;
while
(
_Wchars
&&
)
{
const
*
;
*
;
;
const
auto
=
(
_Mystate
,
,
,
_Mid1
, &
_Ch
, &
_Ch
+
1
,
_Mid2
);
if
(
_Result
::
)
{
_Wchars
+=
static_cast
<
>(
-
);
break
;
}
if
(
_Result
::
)
{
if
(
_Mid2
&
_Ch
+
1
)
{
++
_Wchars
;
}
=
_Mid1
;
continue
;
}
break
;
}
return (static_cast<int>(_Min_value(static_cast<size_t>(INT_MAX), _Wchars)));
return
(
static_cast
<
int
>(
(
static_cast
<
>(
2147483647
),
_Wchars
)));
}
virtual bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override
virtual
bool
()
const
noexcept
override
{
return
(
false
);
}
virtual int __CLR_OR_THIS_CALL do_max_length() const noexcept override
virtual
int
()
const
noexcept
override
{
return
((
&
) !=
0
?
9
: (
&
) !=
0
?
7
:
6
);
}
virtual
int
()
const
noexcept
override
{
return
(
0
);
}
private
:
unsigned
long
;
;
};
template
<>
class _CRTIMP2_PURE_IMPORT codecvt<char32_t, char, _Mbstatet>
class
__declspec
(dllimport)
<
char32_t
,
char
,
>
:
public
{
public
:
typedef
<
char32_t
,
char
,
>
;
typedef
char32_t
;
typedef
char
;
typedef
;
typedef
;
typedef
;
typedef
;
result __CLR_OR_THIS_CALL in(_Statype& _State,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
return
(
(
,
,
,
,
,
,
));
}
result __CLR_OR_THIS_CALL out(_Statype& _State,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
return
(
(
,
,
,
,
,
,
));
}
result __CLR_OR_THIS_CALL unshift(_Statype& _State,
*
,
*
,
*&
)
const
{
return
(
(
,
,
,
));
}
int __CLR_OR_THIS_CALL length(_Statype& _State, const _Byte *_First1,
const
*
,
)
const
{
return
(
(
,
,
,
));
}
__PURE_APPDOMAIN_GLOBAL static locale::id id;
explicit __CLR_OR_THIS_CALL codecvt(size_t _Refs = 0)
:
(
), _Maxcode(
0xffffffff
), _Mode(
)
{
(
_Lobj
);
}
__CLR_OR_THIS_CALL codecvt(const _Locinfo& _Lobj, size_t _Refs = 0)
:
(
), _Maxcode(
0xffffffff
), _Mode(
)
{
(
);
}
__CLR_OR_THIS_CALL codecvt(const _Locinfo& _Lobj, unsigned long _Maxcode_arg,
(
const
&
,
unsigned
long
,
,
=
0
)
:
(
), _Maxcode(
), _Mode(
)
{
(
);
}
static size_t __CLRCALL_OR_CDECL _Getcat(const locale::facet **_Ppf = nullptr,
static
__cdecl
(
const
::
**
=
nullptr
,
const
*
=
nullptr
)
{
if
(
!=
nullptr
&& *
==
nullptr
)
*
=
new
<
,
,
>(
(
->
()));
}
protected
:
virtual __CLR_OR_THIS_CALL ~codecvt() noexcept
{
}
void __CLR_OR_THIS_CALL _Init(const _Locinfo&)
{
}
virtual result __CLR_OR_THIS_CALL do_in(_Statype& _State,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
char
*
= (
char
*)&
;
=
;
=
;
while
(
&&
)
{
unsigned
char
= (
unsigned
char
)*
;
unsigned
long
;
int
;
if
(
_By
0x80
)
{
_Ch
=
_By
;
_Nextra
=
0
;
}
else
if
(
_By
0xc0
)
{
++
;
return
(
::
);
}
else
if
(
_By
0xe0
)
{
_Ch
=
static_cast
<
unsigned
long
>(
_By
&
0x1f
);
_Nextra
=
1
;
}
else
if
(
_By
0xf0
)
{
_Ch
=
static_cast
<
unsigned
long
>(
_By
&
0x0f
);
_Nextra
=
2
;
}
else
if
(
_By
0xf8
)
{
_Ch
=
static_cast
<
unsigned
long
>(
_By
&
0x07
);
_Nextra
=
3
;
}
else
{
_Ch
=
static_cast
<
unsigned
long
>(
_By
&
0x03
);
_Nextra
=
_By
0xfc
?
4
:
5
;
}
if
(
_Nextra
0
)
{
++
;
}
else
if
(
-
_Nextra
+
1
)
{
break
;
}
else
{
for
(++
;
0
_Nextra
; --
_Nextra
, ++
)
{
if
((
_By
= (
unsigned
char
)*
)
0x80
||
0xc0
<=
_By
)
{
return
(
::
);
}
else
{
_Ch
=
_Ch
<<
6
| (
_By
&
0x3f
);
}
}
}
if
(*
_Pstate
0
)
{
*
_Pstate
=
1
;
if
((
&
) !=
0
&&
_Ch
==
0xfeff
)
{
const
=
(
,
,
,
,
,
,
);
if
(
_Ans
::
)
{
*
_Pstate
=
0
;
=
;
}
return
(
_Ans
);
}
}
if
(
_Ch
)
{
return
(
::
);
}
*
++ = (
)
_Ch
;
}
return
(
?
::
:
::
);
}
virtual result __CLR_OR_THIS_CALL do_out(_Statype& _State,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
char
*
= (
char
*)&
;
=
;
=
;
while
(
&&
)
{
;
int
;
unsigned
long
= (
unsigned
long
)*
;
if
(
_Ch
)
return
(
::
);
if
(
_Ch
0x0080
)
{
_By
= (
)
_Ch
;
_Nextra
=
0
;
}
else
if
(
_Ch
0x0800
)
{
_By
= (
)(
0xc0
|
_Ch
>>
6
);
_Nextra
=
1
;
}
else
if
(
_Ch
0x00010000
)
{
_By
= (
)(
0xe0
|
_Ch
>>
12
);
_Nextra
=
2
;
}
else
if
(
_Ch
0x00200000
)
{
_By
= (
)(
0xf0
|
_Ch
>>
18
);
_Nextra
=
3
;
}
else
if
(
_Ch
0x04000000
)
{
_By
= (
)(
0xf8
|
_Ch
>>
24
);
_Nextra
=
4
;
}
else
{
_By
= (
)(
0xfc
| (
_Ch
>>
30
&
0x03
));
_Nextra
=
5
;
}
if
(*
_Pstate
0
)
{
*
_Pstate
=
1
;
if
((
&
) !=
0
)
{
if
(
-
3
+
1
+
_Nextra
)
{
return
(
::
);
}
*
++ = (
)(
unsigned
char
)
0xef
;
*
++ = (
)(
unsigned
char
)
0xbb
;
*
++ = (
)(
unsigned
char
)
0xbf
;
}
}
if
(
-
1
+
_Nextra
)
{
break
;
}
++
;
for
(*
++ =
_By
;
0
_Nextra
; )
{
*
++ = (
)((
_Ch
>>
6
* --
_Nextra
&
0x3f
) |
0x80
);
}
}
return
(
?
::
:
::
);
}
virtual result __CLR_OR_THIS_CALL do_unshift(_Statype&,
*
,
*,
*&
)
const
{
=
;
return
(
::
);
}
virtual int __CLR_OR_THIS_CALL do_length(_Statype& _State, const _Byte *_First1,
virtual
int
(
&
,
const
*
,
const
*
,
)
const
{
=
0
;
=
;
while
(
_Wchars
&&
)
{
const
*
;
*
;
;
const
auto
=
(
_Mystate
,
,
,
_Mid1
, &
_Ch
, &
_Ch
+
1
,
_Mid2
);
if
(
_Result
::
)
{
_Wchars
+=
static_cast
<
>(
-
);
break
;
}
if
(
_Result
::
)
{
if
(
_Mid2
&
_Ch
+
1
)
{
++
_Wchars
;
}
=
_Mid1
;
continue
;
}
break
;
}
return (static_cast<int>(_Min_value(static_cast<size_t>(INT_MAX), _Wchars)));
return
(
static_cast
<
int
>(
(
static_cast
<
>(
2147483647
),
_Wchars
)));
}
virtual bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override
virtual
bool
()
const
noexcept
override
{
return
(
false
);
}
virtual int __CLR_OR_THIS_CALL do_max_length() const noexcept override
virtual
int
()
const
noexcept
override
{
return
((
& (
|
)) !=
0
?
9
:
6
);
}
virtual int __CLR_OR_THIS_CALL do_encoding() const noexcept override
virtual
int
()
const
noexcept
override
{
return
((
& (
|
)) !=
0
? -
1
:
0
);
}
private
:
unsigned
long
;
;
};
template
<>
class _CRTIMP2_PURE_IMPORT codecvt<wchar_t, char, _Mbstatet>
class
__declspec
(dllimport)
<
wchar_t
,
char
,
>
:
public
{
public
:
typedef
wchar_t
;
typedef
char
;
typedef
;
typedef
;
typedef
;
typedef
;
result __CLR_OR_THIS_CALL in(_Statype& _State,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
return
(
(
,
,
,
,
,
,
));
}
result __CLR_OR_THIS_CALL out(_Statype& _State,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
return
(
(
,
,
,
,
,
,
));
}
result __CLR_OR_THIS_CALL unshift(_Statype& _State,
*
,
*
,
*&
)
const
{
return
(
(
,
,
,
));
}
int __CLR_OR_THIS_CALL length(_Statype& _State, const _Byte *_First1,
const
*
,
)
const
{
return
(
(
,
,
,
));
}
__PURE_APPDOMAIN_GLOBAL static locale::id id;
explicit __CLR_OR_THIS_CALL codecvt(size_t _Refs = 0)
:
(
)
{
(
_Lobj
);
}
__CLR_OR_THIS_CALL codecvt(const _Locinfo& _Lobj, size_t _Refs = 0)
:
(
)
{
(
);
}
static size_t __CLRCALL_OR_CDECL _Getcat(const locale::facet **_Ppf = nullptr,
static
__cdecl
(
const
::
**
=
nullptr
,
const
*
=
nullptr
)
{
if
(
!=
nullptr
&& *
==
nullptr
)
*
=
new
<
,
,
>(
(
->
()));
}
protected
:
virtual __CLR_OR_THIS_CALL ~codecvt() noexcept
{
}
void __CLR_OR_THIS_CALL _Init(const _Locinfo& _Lobj)
{
.
();
}
virtual result __CLR_OR_THIS_CALL do_in(_Statype&,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
{};
(
,
);
(
,
);
=
;
=
;
for
(;;)
{
if
(
)
{
return
(
);
}
if
(
)
{
return
(
);
}
int
=
(
,
,
static_cast
<
>(
-
), &
_Mystate
, &
);
switch
(
_Bytes
)
{
case
-
2
:
return
(
);
case
-
1
:
return
(
);
case
0
:
_Bytes
=
1
;
default
:
+=
_Bytes
;
++
;
break
;
}
}
}
virtual result __CLR_OR_THIS_CALL do_out(_Statype& _State,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
(
,
);
(
,
);
=
;
=
;
int
;
while
(
&&
)
{
if ((int)MB_LEN_MAX <= _Last2 - _Mid2)
{
if
((
_Bytes
=
(
, *
,
&
, &
))
0
)
{
return
(
);
}
else
{
++
;
+=
_Bytes
;
}
}
else
{
=
;
if
((
_Bytes
=
(
_Buf
, *
,
&
, &
))
0
)
{
return
(
);
}
else
if
(
-
_Bytes
)
{
_Stsave
;
break
;
}
else
{
_CSTD memcpy(_Mid2, _Buf, static_cast<size_t>(_Bytes));
::
(
,
_Buf
,
static_cast
<
>(
_Bytes
));
++
;
+=
_Bytes
;
}
}
}
return
(
?
:
);
}
virtual result __CLR_OR_THIS_CALL do_unshift(_Statype& _State,
*
,
*
,
*&
)
const
{
(
,
);
=
;
=
;
int
;
=
;
if
((
_Bytes
=
(
_Buf
,
L'\0'
, &
, &
)) <=
0
)
_Ans
=
;
else
if
(
-
--
_Bytes
)
{
_Stsave
;
_Ans
=
;
}
else
if
(
0
_Bytes
)
{
_CSTD memcpy(_Mid2, _Buf, static_cast<size_t>(_Bytes));
::
(
,
_Buf
,
static_cast
<
>(
_Bytes
));
+=
_Bytes
;
}
return
(
_Ans
);
}
virtual int __CLR_OR_THIS_CALL do_length(_Statype&, const _Byte *_First1,
const
*
,
)
const
{
(
,
);
=
0
;
{};
while
(
_Wchars
&&
)
{
;
int
=
(&
_Ch
,
,
static_cast
<
>(
-
), &
_Mystate
, &
);
if
(
_Bytes
0
)
{
break
;
}
if
(
_Bytes
0
)
{
_Bytes
=
1
;
}
+=
_Bytes
;
++
_Wchars
;
}
return (static_cast<int>(_Min_value(static_cast<size_t>(INT_MAX), _Wchars)));
return
(
static_cast
<
int
>(
(
static_cast
<
>(
2147483647
),
_Wchars
)));
}
virtual bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override
virtual
bool
()
const
noexcept
override
{
return
(
false
);
}
virtual int __CLR_OR_THIS_CALL do_max_length() const noexcept override
virtual
int
()
const
noexcept
override
{
}
virtual int __CLR_OR_THIS_CALL do_encoding() const noexcept override
virtual
int
()
const
noexcept
override
{
return
(
0
);
}
private
:
::
;
};
#ifdef _NATIVE_WCHAR_T_DEFINED
template
<>
class _CRTIMP2_PURE_IMPORT codecvt<unsigned short, char, _Mbstatet>
class
__declspec
(dllimport)
<
unsigned
short
,
char
,
>
:
public
{
public
:
typedef
unsigned
short
;
typedef
char
;
typedef
;
typedef
;
typedef
;
typedef
;
result __CLR_OR_THIS_CALL in(_Statype& _State,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
return
(
(
,
,
,
,
,
,
));
}
result __CLR_OR_THIS_CALL out(_Statype& _State,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
return
(
(
,
,
,
,
,
,
));
}
result __CLR_OR_THIS_CALL unshift(_Statype& _State,
*
,
*
,
*&
)
const
{
return
(
(
,
,
,
));
}
int __CLR_OR_THIS_CALL length(_Statype& _State, const _Byte *_First1,
const
*
,
)
const
{
return
(
(
,
,
,
));
}
__PURE_APPDOMAIN_GLOBAL static locale::id id;
explicit __CLR_OR_THIS_CALL codecvt(size_t _Refs = 0)
:
(
)
{
(
_Lobj
);
}
__CLR_OR_THIS_CALL codecvt(const _Locinfo& _Lobj, size_t _Refs = 0)
:
(
)
{
(
);
}
static size_t __CLRCALL_OR_CDECL _Getcat(const locale::facet **_Ppf = nullptr,
static
__cdecl
(
const
::
**
=
nullptr
,
const
*
=
nullptr
)
{
if
(
!=
nullptr
&& *
==
nullptr
)
*
=
new
<
,
,
>(
(
->
()));
}
protected
:
virtual __CLR_OR_THIS_CALL ~codecvt() noexcept
{
}
void __CLR_OR_THIS_CALL _Init(const _Locinfo& _Lobj)
{
.
();
}
virtual result __CLR_OR_THIS_CALL do_in(_Statype&,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
{};
(
,
);
(
,
);
=
;
=
;
for
(;;)
{
if
(
)
{
return
(
);
}
if
(
)
{
return
(
);
}
int
=
(
reinterpret_cast
<
wchar_t
*>(
),
,
static_cast
<
>(
-
), &
_Mystate
, &
);
switch
(
_Bytes
)
{
case
-
2
:
return
(
);
case
-
1
:
return
(
);
case
0
:
_Bytes
=
1
;
default
:
+=
_Bytes
;
++
;
break
;
}
}
}
virtual result __CLR_OR_THIS_CALL do_out(_Statype& _State,
const
*
,
const
*
,
const
*&
,
*
,
*
,
*&
)
const
{
(
,
);
(
,
);
=
;
=
;
int
;
while
(
&&
)
{
if ((int)MB_LEN_MAX <= _Last2 - _Mid2)
{
if
((
_Bytes
=
(
, *
,
&
, &
))
0
)
{
return
(
);
}
else
{
++
;
+=
_Bytes
;
}
}
else
{
=
;
if
((
_Bytes
=
(
_Buf
, *
,
&
, &
))
0
)
{
return
(
);
}
else
if
(
-
_Bytes
)
{
_Stsave
;
break
;
}
else
{
_CSTD memcpy(_Mid2, _Buf, static_cast<size_t>(_Bytes));
::
(
,
_Buf
,
static_cast
<
>(
_Bytes
));
++
;
+=
_Bytes
;
}
}
}
return
(
?
:
);
}
virtual result __CLR_OR_THIS_CALL do_unshift(_Statype& _State,
*
,
*
,
*&
)
const
{
(
,
);
=
;
=
;
int
;
=
;
if
((
_Bytes
=
(
_Buf
,
L'\0'
, &
, &
)) <=
0
)
{
_Ans
=
;
}
else
if
(
-
--
_Bytes
)
{
_Stsave
;
_Ans
=
;
}
else
if
(
0
_Bytes
)
{
_CSTD memcpy(_Mid2, _Buf, static_cast<size_t>(_Bytes));
::
(
,
_Buf
,
static_cast
<
>(
_Bytes
));
+=
_Bytes
;
}
return
(
_Ans
);
}
virtual int __CLR_OR_THIS_CALL do_length(_Statype&, const _Byte *_First1,
const
*
,
)
const
{
(
,
);
=
0
;
{};
while
(
_Wchars
&&
)
{
wchar_t
;
int
=
(&
_Ch
,
,
static_cast
<
>(
-
), &
_Mystate
, &
);
if
(
_Bytes
0
)
{
break
;
}
if
(
_Bytes
0
)
{
_Bytes
=
1
;
}
+=
_Bytes
;
++
_Wchars
;
}
return (static_cast<int>(_Min_value(static_cast<size_t>(INT_MAX), _Wchars)));
return
(
static_cast
<
int
>(
(
static_cast
<
>(
2147483647
),
_Wchars
)));
}
virtual bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override
virtual
bool
()
const
noexcept
override
{
return
(
false
);
}
virtual int __CLR_OR_THIS_CALL do_max_length() const noexcept override
virtual
int
()
const
noexcept
override
{
}
virtual int __CLR_OR_THIS_CALL do_encoding() const noexcept override
virtual
int
()
const
noexcept
override
{
return
(
0
);
}
private
:
::
;
};
#endif /* _NATIVE_WCHAR_T_DEFINED */
template
<
class
,
class
,
class
>
class
:
public
<
,
,
>
{
public
:
explicit __CLR_OR_THIS_CALL codecvt_byname(const char *_Locname, size_t _Refs = 0)
explicit
(
const
char
*
,
=
0
)
:
<
,
,
>(
(
),
)
{
}
explicit __CLR_OR_THIS_CALL codecvt_byname(const string& _Str, size_t _Refs = 0)
:
<
,
,
>(
(
.
()),
)
{
}
protected
:
virtual __CLR_OR_THIS_CALL ~codecvt_byname() noexcept
{
}
};
struct _CRTIMP2_PURE_IMPORT ctype_base
struct
__declspec
(dllimport)
:
public
::
{
enum
{
alnum = _DI | _LO | _UP | _XA, alpha = _LO | _UP | _XA,
=
0x04
|
0x02
|
0x01
|
0x100
,
=
0x02
|
0x01
|
0x100
,
cntrl = _BB, digit = _DI, graph = _DI | _LO | _PU | _UP | _XA,
=
0x20
,
=
0x04
,
=
0x04
|
0x02
|
0x10
|
0x01
|
0x100
,
lower = _LO, print = _DI | _LO | _PU | _SP | _UP | _XA | _XD,
=
0x02
,
=
0x04
|
0x02
|
0x10
|
0x40
|
0x01
|
0x100
|
0x80
,
punct = _PU, space = _CN | _SP | _XS, upper = _UP,
=
0x10
,
=
0x08
|
0x40
|
0x000
,
=
0x01
,
xdigit = _XD, blank = _CN | _SP | _XS | _XB};
=
0x80
,
=
0x08
|
0x40
|
0x000
|
0x000
};
typedef
short
;
__CLR_OR_THIS_CALL ctype_base(size_t _Refs = 0)
:
::
(
)
{
}
__CLR_OR_THIS_CALL ~ctype_base() noexcept
{
}
};
template
<
class
>
class
:
public
{
public
:
typedef
;
bool __CLR_OR_THIS_CALL is(mask _Maskval, _Elem _Ch) const
{
return
(
(
,
));
}
const _Elem *__CLR_OR_THIS_CALL is(const _Elem *_First, const _Elem *_Last,
const
*
(
const
*
,
const
*
,
*
)
const
{
return
(
(
,
,
));
}
const _Elem *__CLR_OR_THIS_CALL scan_is(mask _Maskval, const _Elem *_First,
const
*
)
const
{
return
(
(
,
,
));
}
const _Elem *__CLR_OR_THIS_CALL scan_not(mask _Maskval, const _Elem *_First,
const
*
)
const
{
return
(
(
,
,
));
}
_Elem __CLR_OR_THIS_CALL tolower(_Elem _Ch) const
{
return
(
(
));
}
const _Elem *__CLR_OR_THIS_CALL tolower(_Elem *_First, const _Elem *_Last) const
const
*
(
*
,
const
*
)
const
{
return
(
(
,
));
}
_Elem __CLR_OR_THIS_CALL toupper(_Elem _Ch) const
{
return
(
(
));
}
const _Elem *__CLR_OR_THIS_CALL toupper(_Elem *_First, const _Elem *_Last) const
const
*
(
*
,
const
*
)
const
{
return
(
(
,
));
}
_Elem __CLR_OR_THIS_CALL widen(char _Byte) const
{
return
(
(
));
}
const char *__CLR_OR_THIS_CALL widen(const char *_First, const char *_Last,
const
char
*
(
const
char
*
,
const
char
*
,
*
)
const
{
return
(
(
,
,
));
}
char __CLR_OR_THIS_CALL narrow(_Elem _Ch, char _Dflt = '\0') const
char
(
,
char
=
'\0'
)
const
{
return
(
(
,
));
}
const _Elem *__CLR_OR_THIS_CALL narrow(const _Elem *_First, const _Elem *_Last,
const
*
(
const
*
,
const
*
,
char
,
char
*
)
const
{
return
(
(
,
,
,
));
}
__PURE_APPDOMAIN_GLOBAL static locale::id id;
explicit __CLR_OR_THIS_CALL ctype(size_t _Refs = 0)
:
(
)
{
(
_Lobj
);
}
__CLR_OR_THIS_CALL ctype(const _Locinfo& _Lobj, size_t _Refs = 0)
:
(
)
{
(
);
}
static size_t __CLRCALL_OR_CDECL _Getcat(const locale::facet **_Ppf = nullptr,
static
__cdecl
(
const
::
**
=
nullptr
,
const
*
=
nullptr
)
{
if
(
!=
nullptr
&& *
==
nullptr
)
*
=
new
<
>(
(
->
()));
}
protected
:
virtual __CLR_OR_THIS_CALL ~ctype() noexcept
{
if
(
.
)
_CSTD free((void *)_Ctype._Table);
_CSTD free(_Ctype._LocaleName);
}
void __CLR_OR_THIS_CALL _Init(const _Locinfo& _Lobj)
{
.
();
.
();
}
virtual bool __CLR_OR_THIS_CALL do_is(mask _Maskval, _Elem _Ch) const
{
return
((
.
[(
unsigned
char
)
(
)]
&
)
0
);
}
virtual const _Elem *__CLR_OR_THIS_CALL do_is(const _Elem *_First, const _Elem *_Last,
virtual
const
*
(
const
*
,
const
*
,
*
)
const
{
(
,
);
for
(;
; ++
, ++
)
{
*
=
.
[(
unsigned
char
)
(*
)];
}
return
(
);
}
virtual const _Elem *__CLR_OR_THIS_CALL do_scan_is(mask _Maskval,
const
*
,
const
*
)
const
{
(
,
);
while
(
&& !
(
, *
))
{
++
;
}
return
(
);
}
virtual const _Elem *__CLR_OR_THIS_CALL do_scan_not(mask _Maskval,
const
*
,
const
*
)
const
{
(
,
);
while
(
&&
(
, *
))
{
++
;
}
return
(
);
}
virtual _Elem __CLR_OR_THIS_CALL do_tolower(_Elem _Ch) const
{
unsigned
char
= (
unsigned
char
)
(
,
'\0'
);
if
(
_Byte
'\0'
)
{
return
(
);
}
return
(
((
char
)
(
_Byte
, &
)));
}
virtual const _Elem *__CLR_OR_THIS_CALL do_tolower(_Elem *_First,
const
*
)
const
{
((
const
*)
,
);
for
(;
; ++
)
{
unsigned
char
= (
unsigned
char
)
(*
,
'\0'
);
if
(
_Byte
'\0'
)
{
*
= (
((
char
)
(
_Byte
, &
)));
}
}
return
((
const
*)
);
}
virtual _Elem __CLR_OR_THIS_CALL do_toupper(_Elem _Ch) const
{
unsigned
char
= (
unsigned
char
)
(
,
'\0'
);
if
(
_Byte
'\0'
)
{
return
(
);
}
return
(
((
char
)
(
_Byte
, &
)));
}
virtual const _Elem *__CLR_OR_THIS_CALL do_toupper(_Elem *_First,
const
*
)
const
{
((
const
*)
,
);
for
(;
; ++
)
{
unsigned
char
= (
unsigned
char
)
(*
,
'\0'
);
if
(
_Byte
'\0'
)
{
*
= (
((
char
)
(
_Byte
, &
)));
}
}
return
((
const
*)
);
}
virtual _Elem __CLR_OR_THIS_CALL do_widen(char _Byte) const
{
return
(
(
,
static_cast
<
*>(
nullptr
),
));
}
virtual const char *__CLR_OR_THIS_CALL do_widen(const char *_First,
virtual
const
char
*
(
const
char
*
,
const
char
*
,
*
)
const
{
(
,
);
for
(;
; ++
, ++
)
{
*
=
(*
,
static_cast
<
*>(
nullptr
),
);
}
return
(
);
}
char __CLR_OR_THIS_CALL _Donarrow(_Elem _Ch, char _Dflt) const
{
char
;
if
(
== (
)
0
)
{
return
(
'\0'
);
}
if
((
_Byte
=
(
,
))
'\0'
)
{
return
(
);
}
return
(
_Byte
);
}
virtual char __CLR_OR_THIS_CALL do_narrow(_Elem _Ch, char _Dflt) const
virtual
char
(
,
char
)
const
{
return
(
(
,
));
}
virtual const _Elem *__CLR_OR_THIS_CALL do_narrow(const _Elem *_First,
virtual
const
*
(
const
*
,
const
*
,
char
,
char
*
)
const
{
(
,
);
for
(;
; ++
, ++
)
{
*
=
(*
,
);
}
return
(
);
}
private
:
::
;
::
;
};
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdllimport-static-field-def"
#endif /* __clang__ */
template
<
class
>
::
<
>::
;
#ifdef __clang__
#pragma clang diagnostic pop
#endif /* __clang__ */
template
<>
class _CRTIMP2_PURE_IMPORT ctype<char>
class
__declspec
(dllimport)
<
char
>
:
public
{
public
:
typedef
char
;
typedef
;
bool __CLR_OR_THIS_CALL is(mask _Maskval, _Elem _Ch) const
{
return
((
.
[(
unsigned
char
)
] &
)
0
);
}
const _Elem *__CLR_OR_THIS_CALL is(const _Elem *_First,
const
*
,
*
)
const
{
(
,
);
for
(;
; ++
, ++
)
*
=
.
[(
unsigned
char
)*
];
return
(
);
}
const _Elem *__CLR_OR_THIS_CALL scan_is(mask _Maskval,
const
*
,
const
*
)
const
{
(
,
);
while
(
&& !
(
, *
))
{
++
;
}
return
(
);
}
const _Elem *__CLR_OR_THIS_CALL scan_not(mask _Maskval,
const
*
,
const
*
)
const
{
(
,
);
while
(
&&
(
, *
))
{
++
;
}
return
(
);
}
_Elem __CLR_OR_THIS_CALL tolower(_Elem _Ch) const
{
return
(
(
));
}
const _Elem *__CLR_OR_THIS_CALL tolower(_Elem *_First, const _Elem *_Last) const
const
*
(
*
,
const
*
)
const
{
return
(
(
,
));
}
_Elem __CLR_OR_THIS_CALL toupper(_Elem _Ch) const
{
return
(
(
));
}
const _Elem *__CLR_OR_THIS_CALL toupper(_Elem *_First, const _Elem *_Last) const
const
*
(
*
,
const
*
)
const
{
return
(
(
,
));
}
_Elem __CLR_OR_THIS_CALL widen(char _Byte) const
{
return
(
(
));
}
const _Elem *__CLR_OR_THIS_CALL widen(const char *_First, const char *_Last,
const
*
(
const
char
*
,
const
char
*
,
*
)
const
{
return
(
(
,
,
));
}
_Elem __CLR_OR_THIS_CALL narrow(_Elem _Ch, char _Dflt = '\0') const
{
return
(
(
,
));
}
const _Elem *__CLR_OR_THIS_CALL narrow(const _Elem *_First, const _Elem *_Last,
const
*
(
const
*
,
const
*
,
char
,
char
*
)
const
{
return
(
(
,
,
,
));
}
__PURE_APPDOMAIN_GLOBAL static locale::id id;
explicit __CLR_OR_THIS_CALL ctype(const mask *_Table = nullptr,
explicit
(
const
*
=
nullptr
,
bool
=
false
,
=
0
)
:
(
)
{
(
_Lobj
);
();
if
(
!=
nullptr
)
{
.
=
;
.
=
? -
1
:
0
;
}
else
{
.
=
();
.
=
0
;
}
}
__CLR_OR_THIS_CALL ctype(const _Locinfo& _Lobj, size_t _Refs = 0)
:
(
)
{
(
);
}
static size_t __CLRCALL_OR_CDECL _Getcat(const locale::facet **_Ppf = nullptr,
static
__cdecl
(
const
::
**
=
nullptr
,
const
*
=
nullptr
)
{
if
(
!=
nullptr
&& *
==
nullptr
)
*
=
new
<
>(
(
->
()));
}
const mask *__CLR_OR_THIS_CALL table() const noexcept
const
*
()
const
noexcept
{
return
(
.
);
}
static const mask *__CLRCALL_OR_CDECL classic_table() noexcept
static
const
*
__cdecl
()
noexcept
{
return (_STD use_facet<ctype>(locale::classic()).table());
return
(::
std
::
<
>(
::
()).
());
}
_PGLOBAL static const size_t table_size =
1 << CHAR_BIT; // size of ctype mapping table, typically 256
protected
:
virtual __CLR_OR_THIS_CALL ~ctype() noexcept
{
();
}
void __CLR_OR_THIS_CALL _Init(const _Locinfo& _Lobj)
{
.
();
}
void __CLR_OR_THIS_CALL _Tidy()
{
if
(
0
.
)
_CSTD free((void *)_Ctype._Table);
else
if
(
.
0
)
delete
[]
.
;
_CSTD free(_Ctype._LocaleName);
}
virtual _Elem __CLR_OR_THIS_CALL do_tolower(_Elem _Ch) const
{
return
((
)
((
unsigned
char
)
, &
));
}
virtual const _Elem *__CLR_OR_THIS_CALL do_tolower(_Elem *_First,
const
*
)
const
{
((
const
*)
,
);
for
(;
; ++
)
{
*
= (
)
((
unsigned
char
)*
, &
);
}
return
((
const
*)
);
}
virtual _Elem __CLR_OR_THIS_CALL do_toupper(_Elem _Ch) const
{
return
((
)
((
unsigned
char
)
, &
));
}
virtual const _Elem *__CLR_OR_THIS_CALL do_toupper(_Elem *_First,
const
*
)
const
{
((
const
*)
,
);
for
(;
; ++
)
{
*
= (
)
((
unsigned
char
)*
, &
);
}
return
((
const
*)
);
}
virtual _Elem __CLR_OR_THIS_CALL do_widen(char _Byte) const
{
return
(
);
}
virtual const _Elem *__CLR_OR_THIS_CALL do_widen(const char *_First,
virtual
const
*
(
const
char
*
,
const
char
*
,
*
)
const
{
(
,
);
_CSTD memcpy(_Dest, _First, static_cast<size_t>(_Last - _First));
::
(
,
,
static_cast
<
>(
-
));
return
(
);
}
virtual _Elem __CLR_OR_THIS_CALL do_narrow(_Elem _Ch, char) const
{
return
(
);
}
virtual const _Elem *__CLR_OR_THIS_CALL do_narrow(const _Elem *_First,
virtual
const
*
(
const
*
,
const
*
,
char
,
char
*
)
const
{
(
,
);
_CSTD memcpy(_Dest, _First, static_cast<size_t>(_Last - _First));
::
(
,
,
static_cast
<
>(
-
));
return
(
);
}
private
:
::
;
};
template
<>
class _CRTIMP2_PURE_IMPORT ctype<wchar_t>
class
__declspec
(dllimport)
<
wchar_t
>
:
public
{
public
:
typedef
wchar_t
;
typedef
;
bool __CLR_OR_THIS_CALL is(mask _Maskval, _Elem _Ch) const
{
return
(
(
,
));
}
const _Elem *__CLR_OR_THIS_CALL is(const _Elem *_First, const _Elem *_Last,
const
*
(
const
*
,
const
*
,
*
)
const
{
return
(
(
,
,
));
}
const _Elem *__CLR_OR_THIS_CALL scan_is(mask _Maskval, const _Elem *_First,
const
*
)
const
{
return
(
(
,
,
));
}
const _Elem *__CLR_OR_THIS_CALL scan_not(mask _Maskval, const _Elem *_First,
const
*
)
const
{
return
(
(
,
,
));
}
_Elem __CLR_OR_THIS_CALL tolower(_Elem _Ch) const
{
return
(
(
));
}
const _Elem *__CLR_OR_THIS_CALL tolower(_Elem *_First, const _Elem *_Last) const
const
*
(
*
,
const
*
)
const
{
return
(
(
,
));
}
_Elem __CLR_OR_THIS_CALL toupper(_Elem _Ch) const
{
return
(
(
));
}
const _Elem *__CLR_OR_THIS_CALL toupper(_Elem *_First, const _Elem *_Last) const
const
*
(
*
,
const
*
)
const
{
return
(
(
,
));
}
_Elem __CLR_OR_THIS_CALL widen(char _Byte) const
{
return
(
(
));
}
const char *__CLR_OR_THIS_CALL widen(const char *_First, const char *_Last,
const
char
*
(
const
char
*
,
const
char
*
,
*
)
const
{
return
(
(
,
,
));
}
char __CLR_OR_THIS_CALL narrow(_Elem _Ch, char _Dflt = '\0') const
char
(
,
char
=
'\0'
)
const
{
return
(
(
,
));
}
const _Elem *__CLR_OR_THIS_CALL narrow(const _Elem *_First, const _Elem *_Last,
const
*
(
const
*
,
const
*
,
char
,
char
*
)
const
{
return
(
(
,
,
,
));
}
__PURE_APPDOMAIN_GLOBAL static locale::id id;
explicit __CLR_OR_THIS_CALL ctype(size_t _Refs = 0)
:
(
)
{
(
_Lobj
);
}
__CLR_OR_THIS_CALL ctype(const _Locinfo& _Lobj, size_t _Refs = 0)
:
(
)
{
(
);
}
static size_t __CLRCALL_OR_CDECL _Getcat(const locale::facet **_Ppf = nullptr,
static
__cdecl
(
const
::
**
=
nullptr
,
const
*
=
nullptr
)
{
if
(
!=
nullptr
&& *
==
nullptr
)
{
*
=
new
<
>(
(
->
()));
}
}
protected
:
virtual __CLR_OR_THIS_CALL ~ctype() noexcept
{
if
(
.
)
_CSTD free((void *)_Ctype._Table);
_CSTD free(_Ctype._LocaleName);
}
void __CLR_OR_THIS_CALL _Init(const _Locinfo& _Lobj)
{
.
();
.
();
}
virtual bool __CLR_OR_THIS_CALL do_is(mask _Maskval, _Elem _Ch) const
{
return ((_CSTD _Getwctype(_Ch, &_Ctype) & _Maskval) != 0);
return
((::
(
, &
) &
)
0
);
}
virtual const _Elem *__CLR_OR_THIS_CALL do_is(const _Elem *_First,
virtual
const
*
(
const
*
,
const
*
,
*
)
const
{
(
,
);
return (_CSTD _Getwctypes(_First, _Last, _Dest, &_Ctype));
}
virtual const _Elem *__CLR_OR_THIS_CALL do_scan_is(mask _Maskval,
const
*
,
const
*
)
const
{
(
,
);
while
(
&& !
(
, *
))
{
++
;
}
return
(
);
}
virtual const _Elem *__CLR_OR_THIS_CALL do_scan_not(mask _Maskval,
const
*
,
const
*
)
const
{
(
,
);
while
(
&&
(
, *
))
{
++
;
}
return
(
);
}
virtual _Elem __CLR_OR_THIS_CALL do_tolower(_Elem _Ch) const
{
return
(
(
, &
));
}
virtual const _Elem *__CLR_OR_THIS_CALL do_tolower(_Elem *_First,
const
*
)
const
{
((
const
*)
,
);
for
(;
; ++
)
{
*
=
(*
, &
);
}
return
((
const
*)
);
}
virtual _Elem __CLR_OR_THIS_CALL do_toupper(_Elem _Ch) const
{
return
(
(
, &
));
}
virtual const _Elem *__CLR_OR_THIS_CALL do_toupper(_Elem *_First,
const
*
)
const
{
((
const
*)
,
);
for
(;
; ++
)
{
*
=
(*
, &
);
}
return
((
const
*)
);
}
_Elem __CLR_OR_THIS_CALL _Dowiden(char _Byte) const
{
= {};
wchar_t
;
return
(
(&
_Wc
, &
,
1
, &
_Mbst
, &
)
0
? (wchar_t)WEOF : _Wc);
? (
wchar_t
)((
)(
0xFFFF
)) :
_Wc
);
}
virtual _Elem __CLR_OR_THIS_CALL do_widen(char _Byte) const
{
return
(
(
));
}
virtual const char *__CLR_OR_THIS_CALL do_widen(const char *_First,
virtual
const
char
*
(
const
char
*
,
const
char
*
,
*
)
const
{
(
,
);
for
(;
; ++
, ++
)
{
*
=
(*
);
}
return
(
);
}
char __CLR_OR_THIS_CALL _Donarrow(_Elem _Ch, char _Dflt) const
{
= {};
return
(
(
_Buf
,
, &
_Mbst
, &
)
1
?
:
_Buf
[
0
]);
}
virtual char __CLR_OR_THIS_CALL do_narrow(_Elem _Ch, char _Dflt) const
virtual
char
(
,
char
)
const
{
return
(
(
,
));
}
virtual const _Elem *__CLR_OR_THIS_CALL do_narrow(const _Elem *_First,
virtual
const
*
(
const
*
,
const
*
,
char
,
char
*
)
const
{
(
,
);
for
(;
; ++
, ++
)
{
*
=
(*
,
);
}
return
(
);
}
private
:
::
;
::
;
};
#ifdef _NATIVE_WCHAR_T_DEFINED
template
<>
class _CRTIMP2_PURE_IMPORT ctype<unsigned short>
class
__declspec
(dllimport)
<
unsigned
short
>
:
public
{
public
:
typedef
unsigned
short
;
typedef
;
bool __CLR_OR_THIS_CALL is(mask _Maskval, _Elem _Ch) const
{
return
(
(
,
));
}
const _Elem *__CLR_OR_THIS_CALL is(const _Elem *_First, const _Elem *_Last,
const
*
(
const
*
,
const
*
,
*
)
const
{
return
(
(
,
,
));
}
const _Elem *__CLR_OR_THIS_CALL scan_is(mask _Maskval, const _Elem *_First,
const
*
)
const
{
return
(
(
,
,
));
}
const _Elem *__CLR_OR_THIS_CALL scan_not(mask _Maskval, const _Elem *_First,
const
*
)
const
{
return
(
(
,
,
));
}
_Elem __CLR_OR_THIS_CALL tolower(_Elem _Ch) const
{
return
(
(
));
}
const _Elem *__CLR_OR_THIS_CALL tolower(_Elem *_First, const _Elem *_Last) const
const
*
(
*
,
const
*
)
const
{
return
(
(
,
));
}
_Elem __CLR_OR_THIS_CALL toupper(_Elem _Ch) const
{
return
(
(
));
}
const _Elem *__CLR_OR_THIS_CALL toupper(_Elem *_First, const _Elem *_Last) const
const
*
(
*
,
const
*
)
const
{
return
(
(
,
));
}
_Elem __CLR_OR_THIS_CALL widen(char _Byte) const
{
return
(
(
));
}
const char *__CLR_OR_THIS_CALL widen(const char *_First, const char *_Last,
const
char
*
(
const
char
*
,
const
char
*
,
*
)
const
{
return
(
(
,
,
));
}
char __CLR_OR_THIS_CALL narrow(_Elem _Ch, char _Dflt = '\0') const
char
(
,
char
=
'\0'
)
const
{
return
(
(
,
));
}
const _Elem *__CLR_OR_THIS_CALL narrow(const _Elem *_First, const _Elem *_Last,
const
*
(
const
*
,
const
*
,
char
,
char
*
)
const
{
return
(
(
,
,
,
));
}
__PURE_APPDOMAIN_GLOBAL static locale::id id;
explicit __CLR_OR_THIS_CALL ctype(size_t _Refs = 0)
:
(
)
{
(
_Lobj
);
}
__CLR_OR_THIS_CALL ctype(const _Locinfo& _Lobj, size_t _Refs = 0)
:
(
)
{
(
);
}
static size_t __CLRCALL_OR_CDECL _Getcat(const locale::facet **_Ppf = nullptr,
static
__cdecl
(
const
::
**
=
nullptr
,
const
*
=
nullptr
)
{
if
(
!=
nullptr
&& *
==
nullptr
)
{
*
=
new
<
>(
(
->
()));
}
}
protected
:
virtual __CLR_OR_THIS_CALL ~ctype() noexcept
{
if
(
.
)
_CSTD free((void *)_Ctype._Table);
_CSTD free(_Ctype._LocaleName);
}
void __CLR_OR_THIS_CALL _Init(const _Locinfo& _Lobj)
{
.
();
.
();
}
virtual bool __CLR_OR_THIS_CALL do_is(mask _Maskval, _Elem _Ch) const
{
return ((_CSTD _Getwctype(_Ch, &_Ctype) & _Maskval) != 0);
return
((::
(
, &
) &
)
0
);
}
virtual const _Elem *__CLR_OR_THIS_CALL do_is(const _Elem *_First,
virtual
const
*
(
const
*
,
const
*
,
*
)
const
{
(
,
);
return ((const _Elem *)_CSTD _Getwctypes((const wchar_t *)_First,
return
((
const
*)::
((
const
wchar_t
*)
,
(
const
wchar_t
*)
,
, &
));
}
virtual const _Elem *__CLR_OR_THIS_CALL do_scan_is(mask _Maskval,
const
*
,
const
*
)
const
{
(
,
);
while
(
&& !
(
, *
))
{
++
;
}
return
(
);
}
virtual const _Elem *__CLR_OR_THIS_CALL do_scan_not(mask _Maskval,
const
*
,
const
*
)
const
{
(
,
);
while
(
&&
(
, *
))
{
++
;
}
return
(
);
}
virtual _Elem __CLR_OR_THIS_CALL do_tolower(_Elem _Ch) const
{
return
(
(
, &
));
}
virtual const _Elem *__CLR_OR_THIS_CALL do_tolower(_Elem *_First,
const
*
)
const
{
((
const
*)
,
);
for
(;
; ++
)
{
*
=
(*
, &
);
}
return
((
const
*)
);
}
virtual _Elem __CLR_OR_THIS_CALL do_toupper(_Elem _Ch) const
{
return
(
(
, &
));
}
virtual const _Elem *__CLR_OR_THIS_CALL do_toupper(_Elem *_First,
const
*
)
const
{
((
const
*)
,
);
for
(;
; ++
)
{
*
=
(*
, &
);
}
return
((
const
*)
);
}
_Elem __CLR_OR_THIS_CALL _Dowiden(char _Byte) const
{
= {};
unsigned
short
;
return
(
((
wchar_t
*)&
_Wc
, &
,
1
, &
_Mbst
, &
)
0
? (unsigned short)WEOF : _Wc);
? (
unsigned
short
)((
)(
0xFFFF
)) :
_Wc
);
}
virtual _Elem __CLR_OR_THIS_CALL do_widen(char _Byte) const
{
return
(
(
));
}
virtual const char *__CLR_OR_THIS_CALL do_widen(const char *_First,
virtual
const
char
*
(
const
char
*
,
const
char
*
,
*
)
const
{
(
,
);
for
(;
; ++
, ++
)
{
*
=
(*
);
}
return
(
);
}
char __CLR_OR_THIS_CALL _Donarrow(_Elem _Ch, char _Dflt) const
{
= {};
return
(
(
_Buf
,
, &
_Mbst
, &
)
1
?
:
_Buf
[
0
]);
}
virtual char __CLR_OR_THIS_CALL do_narrow(_Elem _Ch, char _Dflt) const
virtual
char
(
,
char
)
const
{
return
(
(
,
));
}
virtual const _Elem *__CLR_OR_THIS_CALL do_narrow(const _Elem *_First,
virtual
const
*
(
const
*
,
const
*
,
char
,
char
*
)
const
{
(
,
);
for
(;
; ++
, ++
)
{
*
=
(*
,
);
}
return
(
);
}
private
:
::
;
::
;
};
#endif /* _NATIVE_WCHAR_T_DEFINED */
template
<
class
>
class
:
public
<
>
{
public
:
explicit __CLR_OR_THIS_CALL ctype_byname(const char *_Locname, size_t _Refs = 0)
explicit
(
const
char
*
,
=
0
)
:
<
>(
(
),
)
{
}
explicit __CLR_OR_THIS_CALL ctype_byname(const string& _Str, size_t _Refs = 0)
:
<
>(
(
.
()),
)
{
}
protected
:
virtual __CLR_OR_THIS_CALL ~ctype_byname() noexcept
{
}
};
template
<>
class
<
char
>
:
public
<
char
>
{
public
:
explicit __CLR_OR_THIS_CALL ctype_byname(const char *_Locname, size_t _Refs = 0)
explicit
(
const
char
*
,
=
0
)
:
<
char
>(
(
),
)
{
}
explicit __CLR_OR_THIS_CALL ctype_byname(const string& _Str, size_t _Refs = 0)
:
<
char
>(
(
.
()),
)
{
}
protected
:
virtual __CLR_OR_THIS_CALL ~ctype_byname() noexcept
{
}
};
#if defined(_DLL_CPPLIB)
#if !defined(_CRTBLD) || defined(__FORCE_INSTANCE)
template class _CRTIMP2_PURE_IMPORT codecvt<char, char, _Mbstatet>;
#endif /* !defined(_CRTBLD) || defined(__FORCE_INSTANCE) */
#endif /* defined(_DLL_CPPLIB) */
template
class
__declspec
(dllimport)
<
char
,
char
,
>;
#pragma pop_macro("new")
_STL_RESTORE_CLANG_WARNINGS
#pragma warning(pop)
#pragma warning(pop)
#pragma pack(pop)
#endif /* RC_INVOKED */
#endif /* _XLOCALE_ */
#pragma pack(pop)