#pragma once
#ifndef _OSTREAM_
#define _OSTREAM_
#ifndef RC_INVOKED
#include <ios>
#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 _HAS_EXCEPTIONS
#define _TRY_IO_BEGIN _TRY_BEGIN /* begin try block */
#define _CATCH_IO_END _CATCH_ALL /* catch block for _Myios */ \
_Myios::setstate(ios_base::badbit, true); /* set badbit and rethrow */ \
_CATCH_END
#define _CATCH_IO_(x) _CATCH_ALL /* catch block for basic_ios x */ \
(x).setstate(ios_base::badbit, true); /* set badbit and rethrow */ \
_CATCH_END
#else /* _HAS_EXCEPTIONS */
#define _TRY_IO_BEGIN { /* begin try block */
#define _CATCH_IO_END } /* catch block for _Myios */
#define _CATCH_IO_(x) } /* catch block for basic_ios x */
#endif /* _HAS_EXCEPTIONS */
#pragma vtordisp(push, 2) // compiler bug workaround
#pragma vtordisp(push,
2
)
template
<
class
,
class
>
class
:
virtual
public
<
,
>
{
public
:
typedef
<
,
>
;
typedef
<
,
>
;
typedef
<
,
>
;
typedef
<
,
>
;
explicit __CLR_OR_THIS_CALL basic_ostream(
<
,
> *
,
bool
=
false
)
{
::
(
,
);
}
__CLR_OR_THIS_CALL basic_ostream(_Uninitialized, bool _Addit = true)
{
if
(
)
this
->
(
this
);
}
protected
:
__CLR_OR_THIS_CALL basic_ostream(basic_ostream&& _Right)
{
::
();
_Myios::move(_STD move(_Right));
}
basic_ostream& __CLR_OR_THIS_CALL operator=(basic_ostream&& _Right)
{
this
->
(
);
return
(*
this
);
}
void __CLR_OR_THIS_CALL swap(basic_ostream& _Right)
{
if (this != _STD addressof(_Right))
::
(
);
}
public
:
__CLR_OR_THIS_CALL basic_ostream(const basic_ostream&) = delete;
basic_ostream& __CLR_OR_THIS_CALL operator=(const basic_ostream&) = delete;
virtual __CLR_OR_THIS_CALL ~basic_ostream() noexcept
{
}
typedef
typename
::int_type
;
typedef
typename
::pos_type
;
typedef
typename
::off_type
;
class
{
public
:
__CLR_OR_THIS_CALL _Sentry_base(basic_ostream& _Ostr)
: _Myostr(
)
{
if
(
.
() !=
nullptr
)
.
()->_Lock();
}
__CLR_OR_THIS_CALL ~_Sentry_base() noexcept
{
if
(
.
() !=
nullptr
)
.
()->_Unlock();
}
&
;
&
(
const
&) =
delete
;
};
class
:
public
{
public
:
explicit __CLR_OR_THIS_CALL sentry(basic_ostream& _Ostr)
:
(
)
{
if
(
.
() &&
.
() !=
nullptr
&&
.
() != &
)
.
()->flush();
=
.
();
}
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#else /* ^^^ clang ^^^ / vvv not clang vvv */
#pragma warning(push)
#pragma warning(push)
#pragma warning(disable: 4996) // was declared deprecated
#endif /* __clang__ */
#pragma warning(disable:
4996
)
__CLR_OR_THIS_CALL ~sentry() noexcept
{
#if _HAS_EXCEPTIONS
if (!_STD uncaught_exception()) // TRANSITION, OS#15518458
{
this
->
.
();
}
#else /* _HAS_EXCEPTIONS */
this->_Myostr._Osfx();
#endif /* _HAS_EXCEPTIONS */
}
#ifdef __clang__
#pragma clang diagnostic pop
#else /* ^^^ clang ^^^ / vvv not clang vvv */
#pragma warning(pop)
#endif /* __clang__ */
#pragma warning(pop)
explicit __CLR_OR_THIS_CALL operator bool() const
{
return
(
);
}
__CLR_OR_THIS_CALL sentry(const sentry&) = delete;
sentry& __CLR_OR_THIS_CALL operator=(const sentry&) = delete;
private
:
bool
;
};
bool __CLR_OR_THIS_CALL opfx()
{
if
(
this
->
() &&
::
() !=
nullptr
&&
::
() !=
this
)
::
()->flush();
return
(
this
->
());
}
void __CLR_OR_THIS_CALL osfx()
{
();
}
void __CLR_OR_THIS_CALL _Osfx()
{
if
(
this
->
() &&
this
->
() &
::
)
if
(
::
()->pubsync() == -
1
)
::
(
::
);
}
#ifdef _M_CEE_PURE
basic_ostream& __CLR_OR_THIS_CALL operator<<(basic_ostream& (__clrcall *_Pfn)(basic_ostream&))
{ // call basic_ostream manipulator
return ((*_Pfn)(*this));
}
basic_ostream& __CLR_OR_THIS_CALL operator<<(_Myios& (__clrcall *_Pfn)(_Myios&))
{ // call basic_ios manipulator
(*_Pfn)(*(_Myios *)this);
return (*this);
}
basic_ostream& __CLR_OR_THIS_CALL operator<<(ios_base& (__clrcall *_Pfn)(ios_base&))
{ // call ios_base manipulator
(*_Pfn)(*(ios_base *)this);
return (*this);
}
#endif /* _M_CEE_PURE */
basic_ostream& __CLR_OR_THIS_CALL operator<<(basic_ostream& (__cdecl *_Pfn)(basic_ostream&))
{
return
((*
)(*
this
));
}
basic_ostream& __CLR_OR_THIS_CALL operator<<(_Myios& (__cdecl *_Pfn)(_Myios&))
{
(*
)(*(
*)
this
);
return
(*
this
);
}
basic_ostream& __CLR_OR_THIS_CALL operator<<(ios_base& (__cdecl *_Pfn)(ios_base&))
{
(*
)(*(
*)
this
);
return
(*
this
);
}
basic_ostream& __CLR_OR_THIS_CALL operator<<(bool _Val)
{
::
=
::
;
const
(*
this
);
if
(
_Ok
)
{
const _Nput& _Nput_fac = _STD use_facet<_Nput>(this->getloc());
const
&
= ::
std
::
<
>(
this
->
());
if
(
_Nput_fac
.
(
(
::
()), *
this
,
::
(),
).failed())
_State
|=
::
;
_CATCH_IO_END
}
catch
(...) {
::
(
::
,
true
); }
}
::
(
_State
);
return
(*
this
);
}
basic_ostream& __CLR_OR_THIS_CALL operator<<(short _Val)
{
::
=
::
;
const
(*
this
);
if
(
_Ok
)
{
const _Nput& _Nput_fac = _STD use_facet<_Nput>(this->getloc());
const
&
= ::
std
::
<
>(
this
->
());
::
=
this
->
() &
::
;
long
= (
_Bfl
::
||
_Bfl
::
)
? (
long
)(
unsigned
short
)
: (
long
)
;
if
(
_Nput_fac
.
(
(
::
()), *
this
,
::
(),
_Tmp
).failed())
_State
|=
::
;
_CATCH_IO_END
}
catch
(...) {
::
(
::
,
true
); }
}
::
(
_State
);
return
(*
this
);
}
basic_ostream& __CLR_OR_THIS_CALL operator<<(unsigned short _Val)
{
::
=
::
;
const
(*
this
);
if
(
_Ok
)
{
const _Nput& _Nput_fac = _STD use_facet<_Nput>(this->getloc());
const
&
= ::
std
::
<
>(
this
->
());
if
(
_Nput_fac
.
(
(
::
()), *
this
,
::
(), (
unsigned
long
)
).failed())
_State
|=
::
;
_CATCH_IO_END
}
catch
(...) {
::
(
::
,
true
); }
}
::
(
_State
);
return
(*
this
);
}
basic_ostream& __CLR_OR_THIS_CALL operator<<(int _Val)
{
::
=
::
;
const
(*
this
);
if
(
_Ok
)
{
const _Nput& _Nput_fac = _STD use_facet<_Nput>(this->getloc());
const
&
= ::
std
::
<
>(
this
->
());
::
=
this
->
() &
::
;
long
= (
_Bfl
::
||
_Bfl
::
)
? (
long
)(
unsigned
int
)
: (
long
)
;
if
(
_Nput_fac
.
(
(
::
()), *
this
,
::
(),
_Tmp
).failed())
_State
|=
::
;
_CATCH_IO_END
}
catch
(...) {
::
(
::
,
true
); }
}
::
(
_State
);
return
(*
this
);
}
basic_ostream& __CLR_OR_THIS_CALL operator<<(unsigned int _Val)
{
::
=
::
;
const
(*
this
);
if
(
_Ok
)
{
const _Nput& _Nput_fac = _STD use_facet<_Nput>(this->getloc());
const
&
= ::
std
::
<
>(
this
->
());
if
(
_Nput_fac
.
(
(
::
()), *
this
,
::
(), (
unsigned
long
)
).failed())
_State
|=
::
;
_CATCH_IO_END
}
catch
(...) {
::
(
::
,
true
); }
}
::
(
_State
);
return
(*
this
);
}
basic_ostream& __CLR_OR_THIS_CALL operator<<(long _Val)
{
::
=
::
;
const
(*
this
);
if
(
_Ok
)
{
const _Nput& _Nput_fac = _STD use_facet<_Nput>(this->getloc());
const
&
= ::
std
::
<
>(
this
->
());
if
(
_Nput_fac
.
(
(
::
()), *
this
,
::
(),
).failed())
_State
|=
::
;
_CATCH_IO_END
}
catch
(...) {
::
(
::
,
true
); }
}
::
(
_State
);
return
(*
this
);
}
basic_ostream& __CLR_OR_THIS_CALL operator<<(unsigned long _Val)
{
::
=
::
;
const
(*
this
);
if
(
_Ok
)
{
const _Nput& _Nput_fac = _STD use_facet<_Nput>(this->getloc());
const
&
= ::
std
::
<
>(
this
->
());
if
(
_Nput_fac
.
(
(
::
()), *
this
,
::
(),
).failed())
_State
|=
::
;
_CATCH_IO_END
}
catch
(...) {
::
(
::
,
true
); }
}
::
(
_State
);
return
(*
this
);
}
basic_ostream& __CLR_OR_THIS_CALL operator<<(long long _Val)
{
::
=
::
;
const
(*
this
);
if
(
_Ok
)
{
const _Nput& _Nput_fac = _STD use_facet<_Nput>(this->getloc());
const
&
= ::
std
::
<
>(
this
->
());
if
(
_Nput_fac
.
(
(
::
()), *
this
,
::
(),
).failed())
_State
|=
::
;
_CATCH_IO_END
}
catch
(...) {
::
(
::
,
true
); }
}
::
(
_State
);
return
(*
this
);
}
basic_ostream& __CLR_OR_THIS_CALL operator<<(unsigned long long _Val)
{
::
=
::
;
const
(*
this
);
if
(
_Ok
)
{
const _Nput& _Nput_fac = _STD use_facet<_Nput>(this->getloc());
const
&
= ::
std
::
<
>(
this
->
());
if
(
_Nput_fac
.
(
(
::
()), *
this
,
::
(),
).failed())
_State
|=
::
;
_CATCH_IO_END
}
catch
(...) {
::
(
::
,
true
); }
}
::
(
_State
);
return
(*
this
);
}
basic_ostream& __CLR_OR_THIS_CALL operator<<(float _Val)
{
::
=
::
;
const
(*
this
);
if
(
_Ok
)
{
const _Nput& _Nput_fac = _STD use_facet<_Nput>(this->getloc());
const
&
= ::
std
::
<
>(
this
->
());
if
(
_Nput_fac
.
(
(
::
()), *
this
,
::
(), (
double
)
).failed())
_State
|=
::
;
_CATCH_IO_END
}
catch
(...) {
::
(
::
,
true
); }
}
::
(
_State
);
return
(*
this
);
}
basic_ostream& __CLR_OR_THIS_CALL operator<<(double _Val)
{
::
=
::
;
const
(*
this
);
if
(
_Ok
)
{
const _Nput& _Nput_fac = _STD use_facet<_Nput>(this->getloc());
const
&
= ::
std
::
<
>(
this
->
());
if
(
_Nput_fac
.
(
(
::
()), *
this
,
::
(),
).failed())
_State
|=
::
;
_CATCH_IO_END
}
catch
(...) {
::
(
::
,
true
); }
}
::
(
_State
);
return
(*
this
);
}
basic_ostream& __CLR_OR_THIS_CALL operator<<(long double _Val)
{
::
=
::
;
const
(*
this
);
if
(
_Ok
)
{
const _Nput& _Nput_fac = _STD use_facet<_Nput>(this->getloc());
const
&
= ::
std
::
<
>(
this
->
());
if
(
_Nput_fac
.
(
(
::
()), *
this
,
::
(),
).failed())
_State
|=
::
;
_CATCH_IO_END
}
catch
(...) {
::
(
::
,
true
); }
}
::
(
_State
);
return
(*
this
);
}
basic_ostream& __CLR_OR_THIS_CALL operator<<(const void *_Val)
{
::
=
::
;
const
(*
this
);
if
(
_Ok
)
{
const _Nput& _Nput_fac = _STD use_facet<_Nput>(this->getloc());
const
&
= ::
std
::
<
>(
this
->
());
if
(
_Nput_fac
.
(
(
::
()), *
this
,
::
(),
).failed())
_State
|=
::
;
_CATCH_IO_END
}
catch
(...) {
::
(
::
,
true
); }
}
::
(
_State
);
return
(*
this
);
}
#if _HAS_CXX17 // LWG 2221 "No formatted output operator for nullptr"
template<class = void> // TRANSITION, ABI
basic_ostream& operator<<(nullptr_t)
{ // insert a null pointer
return (*this << "nullptr");
}
#endif // _HAS_CXX17
basic_ostream& __CLR_OR_THIS_CALL operator<<(_Mysb *_Strbuf)
{
::
=
::
;
bool
=
false
;
const
(*
this
);
if
(
_Ok
&&
!=
nullptr
)
for
(
=
::eof(); ;
_Copied
=
true
)
{
_Meta
=
::eq_int_type(
::eof(),
_Meta
)
?
->
() :
->
();
::
(
::
);
if
(
::eq_int_type(
::eof(),
_Meta
))
break
;
if
(
::eq_int_type(
::eof(),
::
()->sputc(
::to_char_type(
_Meta
))))
{
_State
|=
::
;
break
;
}
_CATCH_IO_END
}
catch
(...) {
::
(
::
,
true
); }
}
this
->
(
0
);
::
(
==
nullptr
?
::
: !
_Copied
?
_State
|
::
:
_State
);
return
(*
this
);
}
basic_ostream& __CLR_OR_THIS_CALL put(_Elem _Ch)
{
::
=
::
;
const
(*
this
);
if
(!
_Ok
)
_State
|=
::
;
else
{
if
(
::eq_int_type(
::eof(),
::
()->sputc(
)))
_State
|=
::
;
_CATCH_IO_END
}
catch
(...) {
::
(
::
,
true
); }
}
::
(
_State
);
return
(*
this
);
}
basic_ostream& __CLR_OR_THIS_CALL write(const _Elem *_Str,
)
{
::
=
::
;
const
(*
this
);
if
(!
_Ok
)
_State
|=
::
;
else
if
(
0
)
{
if
(
::
()->sputn(
,
) !=
)
_State
|=
::
;
_CATCH_IO_END
}
catch
(...) {
::
(
::
,
true
); }
}
::
(
_State
);
return
(*
this
);
}
basic_ostream& __CLR_OR_THIS_CALL flush()
{
if
(
::
() !=
nullptr
)
{
const
(*
this
);
if
(
_Ok
&&
::
()->pubsync() == -
1
)
::
(
::
);
}
return
(*
this
);
}
basic_ostream& __CLR_OR_THIS_CALL seekp(pos_type _Pos)
{
const
(*
this
);
if
(!
this
->
()
&& (
)
::
()->pubseekpos(
,
::
) == -
1
)
::
(
::
);
return
(*
this
);
}
basic_ostream& __CLR_OR_THIS_CALL seekp(off_type _Off, ios_base::seekdir _Way)
{
const
(*
this
);
if
(!
this
->
()
&& (
)
::
()->pubseekoff(
,
,
::
) == -
1
)
::
(
::
);
return
(*
this
);
}
pos_type __CLR_OR_THIS_CALL tellp()
{
const
(*
this
);
if
(!
this
->
())
return
(
::
()->pubseekoff(
0
,
::
,
::
));
else
return
(
(-
1
));
}
};
#pragma vtordisp(pop) // compiler bug workaround
#pragma vtordisp(pop)
#ifndef _NATIVE_WCHAR_T_DEFINED
/* NOTE:
If you are not using native wchar_t, the following explicit
specialization will mask the member function (above) that treats
an unsigned short as an integer.
To read or write unsigned shorts as integers with wchar_t streams,
make wchar_t a native type with the command line option /Zc:wchar_t.
*/
template<> inline
basic_ostream<unsigned short, char_traits<unsigned short> >&
__CLR_OR_THIS_CALL basic_ostream<unsigned short,
char_traits<unsigned short> >::operator<<(unsigned short _Ch)
{ // extract a character
typedef char_traits<unsigned short> _Traits;
ios_base::iostate _State = ios_base::goodbit;
const sentry _Ok(*this);
if (_Ok)
{ // state okay, insert
streamsize _Pad = this->width() <= 1 ? 0 : this->width() - 1;
_TRY_IO_BEGIN
if ((this->flags() & ios_base::adjustfield) != ios_base::left)
for (; _State == ios_base::goodbit && 0 < _Pad;
--_Pad) // pad on left
if (_Traits::eq_int_type(_Traits::eof(),
this->rdbuf()->sputc(this->fill())))
_State |= ios_base::badbit;
if (_State == ios_base::goodbit
&& _Traits::eq_int_type(_Traits::eof(),
this->rdbuf()->sputc(_Ch)))
_State |= ios_base::badbit;
for (; _State == ios_base::goodbit && 0 < _Pad;
--_Pad) // pad on right
if (_Traits::eq_int_type(_Traits::eof(),
this->rdbuf()->sputc(this->fill())))
_State |= ios_base::badbit;
_CATCH_IO_END
}
this->width(0);
_Myios::setstate(_State);
return (*this);
}
#endif /* _NATIVE_WCHAR_T_DEFINED */
#if defined(_DLL_CPPLIB)
#if !defined(_CRTBLD) || defined(__FORCE_INSTANCE)
template class _CRTIMP2_PURE_IMPORT basic_ostream<char,
template
class
__declspec
(dllimport)
<
char
,
<
char
> >;
template class _CRTIMP2_PURE_IMPORT basic_ostream<wchar_t,
template
class
__declspec
(dllimport)
<
wchar_t
,
<
wchar_t
> >;
#endif /* !defined(_CRTBLD) || defined(__FORCE_INSTANCE) */
#ifdef __FORCE_INSTANCE
template class _CRTIMP2_PURE_IMPORT basic_ostream<unsigned short,
char_traits<unsigned short> >;
#endif /* __FORCE_INSTANCE */
#endif /* defined(_DLL_CPPLIB) */
template
<
class
,
class
>
inline
<
,
>&
(
<
,
>&
,
const
char
*
)
{
::
=
::
;
streamsize _Count = (streamsize)_CSTD strlen(_Val); // may overflow
=
.
() <=
0
||
.
() <=
_Count
?
0
:
.
() -
_Count
;
const
typename
<
,
>::
(
);
if
(!
_Ok
)
_State
|=
::
;
else
{
const ctype<_Elem>& _Ctype_fac = _STD use_facet<ctype<_Elem>>(_Ostr.getloc());
const
<
>&
= ::
std
::
<
<
>>(
.
());
if
((
.
() &
::
) !=
::
)
for
(;
0
_Pad
; --
_Pad
)
if
(
::eq_int_type(
::eof(),
.
()->sputc(
.
())))
{
_State
|=
::
;
break
;
}
for
(;
_State
::
&&
0
<
_Count
; --
_Count
, ++
)
if
(
::eq_int_type(
::eof(),
.
()->sputc(
_Ctype_fac
.
(*
))))
_State
|=
::
;
if
(
_State
::
)
for
(;
0
_Pad
; --
_Pad
)
if
(
::eq_int_type(
::eof(),
.
()->sputc(
.
())))
{
_State
|=
::
;
break
;
}
.
(
0
);
_CATCH_IO_(_Ostr)
}
catch
(...) { (
).
(
::
,
true
); }
}
.
(
_State
);
return
(
);
}
template
<
class
,
class
>
inline
<
,
>&
(
<
,
>&
,
char
)
{
::
=
::
;
const
typename
<
,
>::
(
);
if
(
_Ok
)
{
const ctype<_Elem>& _Ctype_fac = _STD use_facet<ctype<_Elem>>(_Ostr.getloc());
const
<
>&
= ::
std
::
<
<
>>(
.
());
=
.
() <=
1
?
0
:
.
() -
1
;
if
((
.
() &
::
) !=
::
)
for
(;
_State
::
&&
0
<
_Pad
;
--
_Pad
)
if
(
::eq_int_type(
::eof(),
.
()->sputc(
.
())))
_State
|=
::
;
if
(
_State
::
&&
::eq_int_type(
::eof(),
.
()->sputc(
_Ctype_fac
.
(
))))
_State
|=
::
;
for
(;
_State
::
&&
0
<
_Pad
;
--
_Pad
)
if
(
::eq_int_type(
::eof(),
.
()->sputc(
.
())))
_State
|=
::
;
_CATCH_IO_(_Ostr)
}
catch
(...) { (
).
(
::
,
true
); }
}
.
(
0
);
.
(
_State
);
return
(
);
}
template
<
class
>
inline
<
char
,
>&
(
<
char
,
>&
,
const
char
*
)
{
typedef
char
;
typedef
<
,
>
;
::
=
::
;
= (
)
::length(
);
=
.
() <=
0
||
.
() <=
_Count
?
0
:
.
() -
_Count
;
const
typename
::
(
);
if
(!
_Ok
)
_State
|=
::
;
else
{
if
((
.
() &
::
) !=
::
)
for
(;
0
_Pad
; --
_Pad
)
if
(
::eq_int_type(
::eof(),
.
()->sputc(
.
())))
{
_State
|=
::
;
break
;
}
if
(
_State
::
&&
.
()->sputn(
,
_Count
) !=
_Count
)
_State
|=
::
;
if
(
_State
::
)
for
(;
0
_Pad
; --
_Pad
)
if
(
::eq_int_type(
::eof(),
.
()->sputc(
.
())))
{
_State
|=
::
;
break
;
}
.
(
0
);
_CATCH_IO_(_Ostr)
}
catch
(...) { (
).
(
::
,
true
); }
}
.
(
_State
);
return
(
);
}
template
<
class
>
inline
<
char
,
>&
(
<
char
,
>&
,
char
)
{
typedef
char
;
typedef
<
,
>
;
::
=
::
;
const
typename
::
(
);
if
(
_Ok
)
{
=
.
() <=
1
?
0
:
.
() -
1
;
if
((
.
() &
::
) !=
::
)
for
(;
_State
::
&&
0
<
_Pad
;
--
_Pad
)
if
(
::eq_int_type(
::eof(),
.
()->sputc(
.
())))
_State
|=
::
;
if
(
_State
::
&&
::eq_int_type(
::eof(),
.
()->sputc(
)))
_State
|=
::
;
for
(;
_State
::
&&
0
<
_Pad
;
--
_Pad
)
if
(
::eq_int_type(
::eof(),
.
()->sputc(
.
())))
_State
|=
::
;
_CATCH_IO_(_Ostr)
}
catch
(...) { (
).
(
::
,
true
); }
}
.
(
0
);
.
(
_State
);
return
(
);
}
template
<
class
,
class
>
inline
<
,
>&
(
<
,
>&
,
const
*
)
{
typedef
<
,
>
;
::
=
::
;
= (
)
::length(
);
=
.
() <=
0
||
.
() <=
_Count
?
0
:
.
() -
_Count
;
const
typename
::
(
);
if
(!
_Ok
)
_State
|=
::
;
else
{
if
((
.
() &
::
) !=
::
)
for
(;
0
_Pad
; --
_Pad
)
if
(
::eq_int_type(
::eof(),
.
()->sputc(
.
())))
{
_State
|=
::
;
break
;
}
if
(
_State
::
&&
.
()->sputn(
,
_Count
) !=
_Count
)
_State
|=
::
;
if
(
_State
::
)
for
(;
0
_Pad
; --
_Pad
)
if
(
::eq_int_type(
::eof(),
.
()->sputc(
.
())))
{
_State
|=
::
;
break
;
}
.
(
0
);
_CATCH_IO_(_Ostr)
}
catch
(...) { (
).
(
::
,
true
); }
}
.
(
_State
);
return
(
);
}
template
<
class
,
class
>
inline
<
,
>&
(
<
,
>&
,
)
{
typedef
<
,
>
;
::
=
::
;
const
typename
::
(
);
if
(
_Ok
)
{
=
.
() <=
1
?
0
:
.
() -
1
;
if
((
.
() &
::
) !=
::
)
for
(;
_State
::
&&
0
<
_Pad
;
--
_Pad
)
if
(
::eq_int_type(
::eof(),
.
()->sputc(
.
())))
_State
|=
::
;
if
(
_State
::
&&
::eq_int_type(
::eof(),
.
()->sputc(
)))
_State
|=
::
;
for
(;
_State
::
&&
0
<
_Pad
;
--
_Pad
)
if
(
::eq_int_type(
::eof(),
.
()->sputc(
.
())))
_State
|=
::
;
_CATCH_IO_(_Ostr)
}
catch
(...) { (
).
(
::
,
true
); }
}
.
(
0
);
.
(
_State
);
return
(
);
}
template
<
class
>
inline
<
char
,
>&
(
<
char
,
>&
,
const
signed
char
*
)
{
return
(
(
const
char
*)
);
}
template
<
class
>
inline
<
char
,
>&
(
<
char
,
>&
,
signed
char
)
{
return
(
(
char
)
);
}
template
<
class
>
inline
<
char
,
>&
(
<
char
,
>&
,
const
unsigned
char
*
)
{
return
(
(
const
char
*)
);
}
template
<
class
>
inline
<
char
,
>&
(
<
char
,
>&
,
unsigned
char
)
{
return
(
(
char
)
);
}
template
<
class
,
class
,
class
=
void
>
struct
:
{
};
template
<
class
,
class
>
struct _Can_stream_out<_Ostr, _Ty, void_t<decltype(_STD declval<_Ostr&>() << _STD declval<const _Ty&>())>>
struct
<
,
,
<
decltype
(::
std
::
<
&>() << ::
std
::
<
const
&>())>>
:
{
};
template
<
class
,
class
,
<
<
<
<
>>,
<
,
>,
<
,
>>,
int
> =
0
>
inline
&&
(
&&
,
const
&
)
{
<<
;
}
template
<
class
,
class
>
inline
<
,
>&
__CLRCALL_OR_CDECL endl(basic_ostream<_Elem, _Traits>& _Ostr)
{
.
(
.
(
'\n'
));
.
();
return
(
);
}
template
<
class
,
class
>
inline
<
,
>&
__CLRCALL_OR_CDECL ends(basic_ostream<_Elem, _Traits>& _Ostr)
{
.
(
());
return
(
);
}
template
<
class
,
class
>
inline
<
,
>&
__CLRCALL_OR_CDECL flush(basic_ostream<_Elem, _Traits>& _Ostr)
{
.
();
return
(
);
}
template
<
class
,
class
>
inline
<
,
>&
(
<
,
>&
,
const
&
)
{
return
(
.
().
()
':'
.
());
}
#pragma pop_macro("new")
_STL_RESTORE_CLANG_WARNINGS
#pragma warning(pop)
#pragma warning(pop)
#pragma pack(pop)
#endif /* RC_INVOKED */
#endif /* _OSTREAM_ */
#pragma pack(pop)