#pragma once
#ifndef _XUTILITY_
#define _XUTILITY_
#ifndef RC_INVOKED
#include <climits>
#include <cstdlib>
#include <utility>
#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(_M_IX86) || defined(_M_X64)) && !defined(_M_CEE_PURE)
__declspec
(noalias)
void
__cdecl
__std_reverse_trivially_swappable_1
(
void
*
,
void
*
)
noexcept
;
__declspec
(noalias)
void
__cdecl
__std_reverse_trivially_swappable_2
(
void
*
,
void
*
)
noexcept
;
__declspec
(noalias)
void
__cdecl
__std_reverse_trivially_swappable_4
(
void
*
,
void
*
)
noexcept
;
__declspec
(noalias)
void
__cdecl
__std_reverse_trivially_swappable_8
(
void
*
,
void
*
)
noexcept
;
_END_EXTERN_C
#endif /* (defined(_M_IX86) || defined(_M_X64)) && !defined(_M_CEE_PURE) */
}
struct
;
struct
;
struct
;
struct
{
void
()
noexcept
{
}
void
(
&)
noexcept
{
}
};
struct
{
void
(
const
void
*)
noexcept
{
}
const
*
()
const
noexcept
{
return
(
nullptr
);
}
static
constexpr
bool
=
true
;
};
struct
{
()
noexcept
: _Mycont(
nullptr
), _Myfirstiter(
nullptr
)
{
}
const
*
;
*
;
};
struct
{
public
:
()
: _Myproxy(
nullptr
)
{
}
(
const
&)
noexcept
: _Myproxy(
nullptr
)
{
}
&
(
const
&)
noexcept
{
return
(*
this
);
}
**
()
const
noexcept
{
return
(
==
nullptr
?
nullptr
: &
->
);
}
void
()
noexcept
;
void
(
&)
noexcept
;
*
;
};
struct
{
()
noexcept
: _Myproxy(
nullptr
), _Mynextiter(
nullptr
)
{
}
(
const
&
)
noexcept
: _Myproxy(
nullptr
), _Mynextiter(
nullptr
)
{
*
this
;
}
&
(
const
&
)
noexcept
{
if
(
.
)
{
if
(
.
==
nullptr
)
{
#if _ITERATOR_DEBUG_LEVEL == 2
_Lockit _Lock(_LOCK_DEBUG);
();
#endif /* _ITERATOR_DEBUG_LEVEL == 2 */
}
else
{
(
.
->
);
}
}
return
(*
this
);
}
()
noexcept
{
#if _ITERATOR_DEBUG_LEVEL == 2
_Lockit _Lock(_LOCK_DEBUG);
();
#endif /* _ITERATOR_DEBUG_LEVEL == 2 */
}
void
(
const
*
)
noexcept
{
if
(
==
nullptr
)
{
#if _ITERATOR_DEBUG_LEVEL == 2
_Lockit _Lock(_LOCK_DEBUG);
();
#endif /* _ITERATOR_DEBUG_LEVEL == 2 */
}
else
{
*
=
->
;
#if _ITERATOR_DEBUG_LEVEL == 2
if
(
_Parent_proxy
)
{
_Lockit _Lock(_LOCK_DEBUG);
();
=
_Parent_proxy
->
;
_Parent_proxy
->
=
this
;
=
_Parent_proxy
;
}
#else /* _ITERATOR_DEBUG_LEVEL == 2 */
_Myproxy = _Parent_proxy;
#endif /* _ITERATOR_DEBUG_LEVEL == 2 */
}
}
void
()
noexcept
{
=
nullptr
;
}
const
*
()
const
noexcept
{
return
(
==
nullptr
?
nullptr
:
->
);
}
**
()
noexcept
{
return
(&
);
}
void
()
noexcept
{
#if _ITERATOR_DEBUG_LEVEL == 2
if
(
!=
nullptr
)
{
**
= &
->
;
while
(*
_Pnext
!=
nullptr
&& *
_Pnext
!=
this
)
_Pnext
= &(*
_Pnext
)->
;
_STL_VERIFY(*_Pnext, "ITERATOR LIST CORRUPTED!");
do
{
if
(*
_Pnext
) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
199
,
0
,
"%s"
,
"ITERATOR LIST CORRUPTED!"
)) || (__debugbreak(),
0
)); ::
(
L"\"ITERATOR LIST CORRUPTED!\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
199
,
0
); }
while
(
false
); } ; }
while
(
false
);
*
_Pnext
=
;
=
nullptr
;
}
#endif /* _ITERATOR_DEBUG_LEVEL == 2 */
}
static constexpr bool _Unwrap_when_unverified = _ITERATOR_DEBUG_LEVEL == 0;
static
constexpr
bool
=
2
0
;
*
;
*
;
};
inline
void
::
()
noexcept
{
#if _ITERATOR_DEBUG_LEVEL == 2
if
(
!=
nullptr
)
{
_Lockit _Lock(_LOCK_DEBUG);
for
(
**
= &
->
;
*
_Pnext
!=
nullptr
; *
_Pnext
= (*
_Pnext
)->
)
(*
_Pnext
)->
=
nullptr
;
->
=
nullptr
;
}
#endif /* _ITERATOR_DEBUG_LEVEL == 2 */
}
inline
void
::
(
&
)
noexcept
{
#if _ITERATOR_DEBUG_LEVEL == 2
_Lockit _Lock(_LOCK_DEBUG);
#endif /* _ITERATOR_DEBUG_LEVEL == 2 */
*
=
;
=
.
;
.
=
_Temp
;
if
(
!=
nullptr
)
->
= (
*)
this
;
if
(
.
!=
nullptr
)
.
->
= (
*)&
;
}
#if _ITERATOR_DEBUG_LEVEL == 0
using _Container_base = _Container_base0;
using _Iterator_base = _Iterator_base0;
#else /* _ITERATOR_DEBUG_LEVEL == 0 */
using
=
;
using
=
;
#endif /* _ITERATOR_DEBUG_LEVEL == 0 */
struct
_Zero_then_variadic_args_t
{
};
struct
_One_then_variadic_args_t
{
};
template
<
class
,
class
,
bool
=
<
> && !
<
>>
class
final
:
private
{
private
:
;
using
=
;
public
:
template
<
class
...
>
constexpr
explicit
(
_Zero_then_variadic_args_t
,
&&...
)
: _Ty1(), _Myval2(_STD forward<_Other2>(_Val2)...)
:
(), _Myval2(::
std
::
<
>(
)...)
{
}
template
<
class
,
class
...
>
(
_One_then_variadic_args_t
,
&&
,
&&...
)
: _Ty1(_STD forward<_Other1>(_Val1)),
_Myval2(_STD forward<_Other2>(_Val2)...)
{
}
&
()
noexcept
{
return
(*
this
);
}
const
&
()
const
noexcept
{
return
(*
this
);
}
&
()
noexcept
{
return
(
);
}
const
&
()
const
noexcept
{
return
(
);
}
};
template
<
class
,
class
>
class
<
,
,
false
>
final
{
private
:
;
;
public
:
template
<
class
...
>
constexpr
explicit
(
_Zero_then_variadic_args_t
,
&&...
)
: _Myval1(), _Myval2(_STD forward<_Other2>(_Val2)...)
: _Myval1(), _Myval2(::
std
::
<
>(
)...)
{
}
template
<
class
,
class
...
>
(
_One_then_variadic_args_t
,
&&
,
&&...
)
: _Myval1(_STD forward<_Other1>(_Val1)),
_Myval2(_STD forward<_Other2>(_Val2)...)
{
}
&
()
noexcept
{
return
(
);
}
const
&
()
const
noexcept
{
return
(
);
}
&
()
noexcept
{
return
(
);
}
const
&
()
const
noexcept
{
return
(
);
}
};
template
<
class
>
struct
{
template
<
class
...
>
constexpr
decltype
(
auto
)
(
&&...
)
{
return (_Fn(_STD forward<_Args>(_Vals)...));
return
(
(::
std
::
<
>(
)...));
}
&
;
};
template
<
class
>
_INLINE_VAR constexpr bool _Pass_functor_by_value_v = sizeof(_Fn) <= sizeof(void *)
constexpr
bool
=
sizeof
(
) <=
sizeof
(
void
*)
&&
<
is_trivially_copy_constructible
<
>,
is_trivially_destructible
<
>>;
template
<
class
,
<
<
>,
int
> =
0
>
constexpr
(
)
{
return
(
);
}
template
<
class
,
<!
<
>,
int
> =
0
>
constexpr
<
>
(
&
)
{
return
{
};
}
struct
{
};
struct
{
};
struct
:
{
};
struct
bidirectional_iterator_tag
:
{
};
struct
random_access_iterator_tag
:
bidirectional_iterator_tag
{
};
struct
_General_ptr_iterator_tag
{
};
struct
_Trivially_copyable_ptr_iterator_tag
:
_General_ptr_iterator_tag
{
};
struct
_Really_trivial_ptr_iterator_tag
:
_Trivially_copyable_ptr_iterator_tag
{
};
struct
{
constexpr
()
noexcept
=
default
;
template
<
class
>
constexpr
(
&&)
noexcept
{}
};
using
=
;
template
<
class
>
using
=
<
<
>,
,
>;
template
<
class
,
class
=
void
>
struct
{
};
template
<
class
>
struct
<
,
<
typename
::iterator_category,
typename
::value_type,
typename
::difference_type,
typename
::pointer,
typename
::reference
>>
{
using
=
typename
::iterator_category;
using
=
typename
::value_type;
using
=
typename
::difference_type;
using
=
typename
::pointer;
using
=
typename
::reference;
};
template
<
class
,
bool
=
<
>>
struct
_Iterator_traits_pointer_base
{
using
=
random_access_iterator_tag
;
using
=
<
>;
using
=
;
using
=
*;
using
=
&;
};
template
<
class
>
struct
_Iterator_traits_pointer_base
<
,
false
>
{
};
template
<
class
>
struct
:
<
>
{
};
template
<
class
>
struct
<
*>
:
_Iterator_traits_pointer_base
<
>
{
};
template
<
class
>
using
=
typename
<
>::
;
template
<
class
>
using
=
typename
<
>::
;
template
<
class
...
>
using
=
<
<
>...>;
template
<
class
>
using
=
typename
<
>::
;
template
<
class
,
class
=
void
>
_INLINE_VAR constexpr bool _Is_iterator_v = false;
template
<
class
>
_INLINE_VAR constexpr bool _Is_iterator_v<_Ty, void_t<_Iter_cat_t<_Ty>>> = true;
constexpr
bool
<
,
<
<
>>> =
true
;
template
<
class
>
struct
:
<
<
>>
{
};
template
<
class
>
_INLINE_VAR constexpr bool _Is_input_iter_v = is_convertible_v<_Iter_cat_t<_Iter>, input_iterator_tag>;
template
<
class
>
_INLINE_VAR constexpr bool _Is_fwd_iter_v = is_convertible_v<_Iter_cat_t<_Iter>, forward_iterator_tag>;
template
<
class
>
_INLINE_VAR constexpr bool _Is_bidi_iter_v = is_convertible_v<_Iter_cat_t<_Iter>, bidirectional_iterator_tag>;
constexpr
bool
=
<
<
>,
bidirectional_iterator_tag
>;
template
<
class
>
_INLINE_VAR constexpr bool _Is_random_iter_v = is_convertible_v<_Iter_cat_t<_Iter>, random_access_iterator_tag>;
constexpr
bool
=
<
<
>,
random_access_iterator_tag
>;
template
<
class
,
class
=
void
>
struct
{
};
#if _ITERATOR_DEBUG_LEVEL != 0
template
<
class
>
constexpr
void
(
const
*
const
,
const
*
const
)
noexcept
{
_STL_VERIFY(_First <= _Last, "transposed pointer range");
do
{
if
(
<=
) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
559
,
0
,
"%s"
,
"transposed pointer range"
)) || (__debugbreak(),
0
)); ::
(
L"\"transposed pointer range\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
559
,
0
); }
while
(
false
); } ; }
while
(
false
);
}
#endif /* _ITERATOR_DEBUG_LEVEL != 0 */
template
<
class
,
class
=
,
class
=
void
>
struct
:
{
};
template
<
class
,
class
>
struct
<
,
,
<
decltype(_Verify_range(_STD declval<const _Iter&>(), _STD declval<const _Sentinel&>()))>>
decltype
(
(::
std
::
<
const
&>(), ::
std
::
<
const
&>()))>>
:
{
};
template
<
class
,
class
=
>
_INLINE_VAR constexpr bool _Range_verifiable_v = _Range_verifiable<_Iter, _Sentinel>::value;
#if _HAS_IF_CONSTEXPR
template<class _Iter,
class _Sentinel>
constexpr void _Adl_verify_range(const _Iter& _First, const _Sentinel& _Last)
{ // check that [_First, _Last) forms an iterator range
if constexpr (_Range_verifiable_v<_Iter, _Sentinel>)
{
_Verify_range(_First, _Last);
}
else
{
(void)_First;
(void)_Last;
}
}
#else /* ^^^ _HAS_IF_CONSTEXPR ^^^ // vvv !_HAS_IF_CONSTEXPR vvv */
template
<
class
,
class
>
constexpr
void
(
const
&
,
const
&
,
)
{
(
,
);
}
template
<
class
,
class
>
constexpr
void
(
const
&,
const
&,
)
{
}
template
<
class
,
class
>
constexpr
void
(
const
&
,
const
&
)
{
(
,
,
<
<
,
>>{});
}
#endif /* _HAS_IF_CONSTEXPR */
template
<
class
,
class
=
void
>
struct
:
{
};
template
<
class
>
struct
<
,
<
decltype(_STD declval<_Iter&>()._Seek_to(_STD declval<const _Iter&>()._Unwrapped()))>>
decltype
(::
std
::
<
&>()._Seek_to(::
std
::
<
const
&>()._Unwrapped()))>>
:
{
};
template
<
class
>
_INLINE_VAR constexpr bool _Unwrappable_v = _Unwrappable<_Iter>::value;
template
<
class
,
<
<
>,
int
> =
0
>
_NODISCARD constexpr auto _Get_unwrapped(const _Iter& _It)
constexpr
auto
(
const
&
)
{
return
(
._Unwrapped());
}
template
<
class
,
<!
<
>,
int
> =
0
>
_NODISCARD constexpr const _Iter& _Get_unwrapped(const _Iter& _It)
constexpr
const
&
(
const
&
)
{
return
(
);
}
template
<
class
,
<!
<
>,
int
> =
0
>
_NODISCARD constexpr const _Iter&& _Get_unwrapped(const _Iter&& _It)
constexpr
const
&&
(
const
&&
)
{
return
(
static_cast
<
const
&&>(
));
}
template
<
class
>
_NODISCARD constexpr _Ty * _Get_unwrapped(_Ty * const _Ptr)
{
return
(
);
}
template
<
class
>
using _Unwrapped_t = remove_cv_t<remove_reference_t<decltype(_Get_unwrapped(_STD declval<const _Iter&>()))>>;
using
=
<
<
decltype
(
(::
std
::
<
const
&>()))>>;
template
<
class
,
class
=
bool
>
struct
_Do_unwrap_when_unverified
:
{
};
template
<
class
>
struct
_Do_unwrap_when_unverified
<
,
decltype
(
static_cast
<
bool
>(
::_Unwrap_when_unverified))>
:
<
static_cast
<
bool
>(
::_Unwrap_when_unverified)>
{
};
template
<
class
>
_INLINE_VAR constexpr bool _Do_unwrap_when_unverified_v = _Do_unwrap_when_unverified<_Iter>::value;
constexpr
bool
_Do_unwrap_when_unverified_v
=
_Do_unwrap_when_unverified
<
>::
;
template
<
class
>
_INLINE_VAR constexpr bool _Unwrappable_for_unverified_v = _Unwrappable_v<_Iter>
constexpr
bool
_Unwrappable_for_unverified_v
=
<
>
&&
_Do_unwrap_when_unverified_v
<
>;
template
<
class
,
<
_Unwrappable_for_unverified_v
<
>,
int
> =
0
>
_NODISCARD constexpr auto _Get_unwrapped_unverified(const _Iter& _It)
constexpr
auto
_Get_unwrapped_unverified
(
const
&
)
{
return
(
._Unwrapped());
}
template
<
class
,
<!
_Unwrappable_for_unverified_v
<
>,
int
> =
0
>
_NODISCARD constexpr const _Iter& _Get_unwrapped_unverified(const _Iter& _It)
constexpr
const
&
_Get_unwrapped_unverified
(
const
&
)
{
return
(
);
}
template
<
class
,
<!
_Unwrappable_for_unverified_v
<
>,
int
> =
0
>
_NODISCARD constexpr const _Iter&& _Get_unwrapped_unverified(const _Iter&& _It)
constexpr
const
&&
_Get_unwrapped_unverified
(
const
&&
)
{
return
(
static_cast
<
const
&&>(
));
}
template
<
class
>
_NODISCARD constexpr _Ty * _Get_unwrapped_unverified(_Ty * const _Ptr)
constexpr
*
_Get_unwrapped_unverified
(
*
const
)
{
return
(
);
}
template
<
class
>
using
=
<
<
decltype(_Get_unwrapped_unverified(_STD declval<const _Iter&>()))>>;
decltype
(
_Get_unwrapped_unverified
(::
std
::
<
const
&>()))>>;
struct
{
constexpr
()
const
noexcept
{
return
{};
}
};
template
<
class
>
_INLINE_VAR constexpr _Diff _Max_possible_v = static_cast<_Diff>(static_cast<make_unsigned_t<_Diff>>(-1) >> 1);
constexpr
=
static_cast
<
>(
static_cast
<
<
>>(-
1
) >>
1
);
template
<
class
>
_INLINE_VAR constexpr _Diff _Min_possible_v = -_Max_possible_v<_Diff> - 1;
template
<
class
,
class
=
void
>
struct
:
{
};
template
<
class
>
struct
<
,
<
decltype
(
_STD declval<const _Iter&>()._Verify_offset(_Iter_diff_t<_Iter>{}))>>
::
std
::
<
const
&>()._Verify_offset(
<
>{}))>>
:
{
};
template
<
class
>
_INLINE_VAR constexpr bool _Offset_verifiable_v = _Offset_verifiable<_Iter>::value;
template
<
class
>
_INLINE_VAR constexpr bool _Unwrappable_for_offset_v = _Unwrappable_v<_Iter> && _Offset_verifiable_v<_Iter>;
constexpr
bool
_Unwrappable_for_offset_v
=
<
> &&
<
>;
template
<
class
,
class
,
<
_Unwrappable_for_offset_v
<
> &&
<
>,
int
> =
0
>
_NODISCARD constexpr auto _Get_unwrapped_n(const _Iter& _It, const _Diff _Off)
constexpr
auto
(
const
&
,
const
)
{
using
=
<
>;
using
=
<
,
>;
const
auto
=
static_cast
<
>(
);
_STL_ASSERT(_COff <= static_cast<_CDiff>(_Max_possible_v<_IDiff>)
&& (is_unsigned_v<_Diff> || static_cast<_CDiff>(_Min_possible_v<_IDiff>) <= _COff),
"integer overflow");
do
{
if
(
_COff
<=
static_cast
<
>(
<
>) && (
<
> ||
static_cast
<
>(
<
>) <=
_COff
)) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
767
,
0
,
"%s"
,
"integer overflow"
)) || (__debugbreak(),
0
)); ::
(
L"\"integer overflow\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
767
,
0
); }
while
(
false
); } ; }
while
(
false
);
(
void
)
_COff
;
._Verify_offset(
static_cast
<
>(
));
return
(
._Unwrapped());
}
template
<
class
,
class
,
<
_Unwrappable_for_unverified_v
<
>
&& ((!
_Unwrappable_for_offset_v
<
> &&
<
>)
||
<
,
>),
int
> =
0
>
_NODISCARD constexpr auto _Get_unwrapped_n(const _Iter& _It, _Diff)
constexpr
auto
(
const
&
,
)
{
return
(
._Unwrapped());
}
template
<
class
,
class
,
<!
_Unwrappable_for_unverified_v
<
>
&& ((!
_Unwrappable_for_offset_v
<
> &&
<
>)
||
<
,
>),
int
> =
0
>
_NODISCARD constexpr const _Iter& _Get_unwrapped_n(const _Iter& _It, _Diff)
constexpr
const
&
(
const
&
,
)
{
return
(
);
}
template
<
class
,
class
,
<!
_Unwrappable_for_unverified_v
<
>
&& ((!
_Unwrappable_for_offset_v
<
> &&
<
>)
||
<
,
>),
int
> =
0
>
_NODISCARD constexpr const _Iter&& _Get_unwrapped_n(const _Iter&& _It, _Diff)
constexpr
const
&&
(
const
&&
,
)
{
return
(
static_cast
<
const
&&>(
));
}
template
<
class
,
class
,
<
<
,
> ||
<
>,
int
> =
0
>
_NODISCARD constexpr _Ty * _Get_unwrapped_n(_Ty * const _Src, _Diff)
constexpr
*
(
*
const
,
)
{
return
(
);
}
template
<
class
>
using
=
<
<
decltype(_Get_unwrapped_n(_STD declval<const _Iter&>(), _Iter_diff_t<_Iter>{}))>>;
decltype
(
(::
std
::
<
const
&>(),
<
>{}))>>;
template
<
class
,
class
,
class
=
void
>
struct
:
{
};
template
<
class
,
class
>
struct
<
,
,
<
decltype(_STD declval<_Iter&>()._Seek_to(_STD declval<const _UIter&>()))>>
decltype
(::
std
::
<
&>()._Seek_to(::
std
::
<
const
&>()))>>
:
{
};
template
<
class
,
class
>
_INLINE_VAR constexpr bool _Wrapped_seekable_v = _Wrapped_seekable<_Iter, _UIter>::value;
#if _HAS_IF_CONSTEXPR
template<class _Iter,
class _UIter>
constexpr void _Seek_wrapped(_Iter& _It, const _UIter& _UIt)
{
if constexpr (_Wrapped_seekable_v<_Iter, _UIter>)
{
_It._Seek_to(_UIt);
}
else
{
_It = _UIt;
}
}
#else /* ^^^ _HAS_IF_CONSTEXPR ^^^ // vvv !_HAS_IF_CONSTEXPR vvv */
template
<
class
,
class
,
<
<
,
>,
int
> =
0
>
constexpr
void
(
&
,
const
&
)
{
._Seek_to(
);
}
template
<
class
,
class
,
<!
<
,
>,
int
> =
0
>
constexpr
void
(
&
,
const
&
)
{
=
;
}
#endif /* _HAS_IF_CONSTEXPR */
template
<
class
>
constexpr
void
(
*&
,
*
const
)
{
=
;
}
#if _HAS_CXX17
// STRUCT TEMPLATE _Is_allocator
template<class _Ty,
class = void>
struct _Is_allocator
: false_type
{ // selected when _Ty can't possibly be an allocator
};
template<class _Ty>
struct _Is_allocator<_Ty, void_t<
typename _Ty::value_type,
decltype(_STD declval<_Ty&>().deallocate(_STD declval<_Ty&>().allocate(size_t{1}), size_t{1}))
>>
: true_type
{ // selected when _Ty resembles an allocator, N4687 26.2.1 [container.requirements.general]/17
};
// ALIAS TEMPLATES FOR DEDUCTION GUIDES, N4687 26.4.1 [associative.general]/2
template<class _Iter>
using _Guide_key_t = remove_const_t<typename iterator_traits<_Iter>::value_type::first_type>;
template<class _Iter>
using _Guide_val_t = typename iterator_traits<_Iter>::value_type::second_type;
template<class _Iter>
using _Guide_pair_t = pair<add_const_t<typename iterator_traits<_Iter>::value_type::first_type>,
typename iterator_traits<_Iter>::value_type::second_type>;
#endif /* _HAS_CXX17 */
template
<
>
struct
:
<
-
1
>
{
};
template
<>
struct
<
0
>
{
};
#if _HAS_CXX17
// STRUCT TEMPLATE is_execution_policy
template<class _Ty>
struct is_execution_policy
: false_type
{
};
template<class _Ty>
_INLINE_VAR constexpr bool is_execution_policy_v = is_execution_policy<_Ty>::value;
// ALIAS TEMPLATE _Enable_if_execution_policy_t
// Note: The noexcept specifiers on all parallel algorithm overloads enforce termination as per
// N4713 23.19.4 [execpol.seq]/2, 23.19.5 [execpol.par]/2, and 23.19.6 [execpol.parunseq]/2
template<class _ExPo>
using _Enable_if_execution_policy_t = typename remove_reference_t<_ExPo>::_Standard_execution_policy;
#define _REQUIRE_PARALLEL_ITERATOR(_Iter) static_assert(_Is_fwd_iter_v<_Iter>, \
"Parallel algorithms require forward iterators or stronger.")
#endif /* _HAS_CXX17 */
#if _HAS_IF_CONSTEXPR
template<class _Checked,
class _Iter> inline
auto _Idl_distance(const _Iter& _First, const _Iter& _Last)
{ // tries to get the distance between _First and _Last if they are random-access iterators
if constexpr (_Is_random_iter_v<_Iter>)
{
return (static_cast<_Iter_diff_t<_Checked>>(_Last - _First));
}
else
{
(void)_First;
(void)_Last;
return _Distance_unknown{};
}
}
#else /* ^^^ _HAS_IF_CONSTEXPR ^^^ // vvv !_HAS_IF_CONSTEXPR vvv */
template
<
class
,
class
>
inline
(
const
&,
const
&,
)
{
return
{};
}
template
<
class
,
class
>
inline
<
>
(
const
&
,
const
&
,
random_access_iterator_tag
)
{
return
(
static_cast
<
<
>>(
-
));
}
template
<
class
,
class
>
inline
auto
(
const
&
,
const
&
)
{
return
(
<
>(
,
,
<
>()));
}
#endif /* _HAS_IF_CONSTEXPR */
template
<
class
,
class
>
struct
:
<
sizeof
(
) ==
sizeof
(
)>
{
};
template
<
class
,
bool
=
<
>>
struct
{
using
=
<
>;
};
template
<
class
>
struct
<
,
false
>
{
using
=
;
};
template
<
class
>
using
=
typename
<
>::
;
template
<
class
,
class
>
struct
:
<
<
bool
,
> ==
<
bool
,
>>
{
};
template
<
class
,
class
>
struct
{
using
=
<
>;
using
=
<
>;
using
=
<
<
<
,
>,
<
>,
<
>,
<
,
>
>,
_Really_trivial_ptr_iterator_tag
,
_General_ptr_iterator_tag
>;
};
template
<
class
>
struct
<
,
>
{
using
=
<
<
>,
<
<
>,
_Really_trivial_ptr_iterator_tag
,
_Trivially_copyable_ptr_iterator_tag
>,
_General_ptr_iterator_tag
>;
};
template
<
class
>
struct
<
*,
const
*>
{
using
=
_Really_trivial_ptr_iterator_tag
;
};
template
<
class
>
struct
<
*,
volatile
*>
{
using
=
_Really_trivial_ptr_iterator_tag
;
};
template
<
class
>
struct
<
*,
const
volatile
*>
{
using
=
_Really_trivial_ptr_iterator_tag
;
};
template
<
class
,
class
>
inline
_General_ptr_iterator_tag
(
const
&,
const
&)
{
return
{};
}
template
<
class
,
class
>
inline
<
is_trivially_assignable_v
<
&,
&>,
typename
<
<
>,
<
>>::
,
_General_ptr_iterator_tag
>
(
*
const
&,
*
const
&)
{
return
{};
}
template
<
class
,
class
>
inline
_General_ptr_iterator_tag
(
const
&,
const
&)
{
return
{};
}
template
<
class
,
class
>
inline
<
is_trivially_assignable_v
<
&,
>,
typename
<
<
>,
<
>>::
,
_General_ptr_iterator_tag
>
(
*
const
&,
*
const
&)
{
return
{};
}
#if _ITERATOR_DEBUG_LEVEL < 2
#define _DEBUG_LT_PRED(pred, x, y) pred(x, y)
#define _DEBUG_ORDER_UNWRAPPED(first, last, pred)
#define _DEBUG_ORDER_SET_UNWRAPPED(otherIter, first, last, pred)
#else /* _ITERATOR_DEBUG_LEVEL < 2 */
#define _DEBUG_LT_PRED(pred, x, y) _Debug_lt_pred(pred, x, y)
#define _DEBUG_ORDER_UNWRAPPED(first, last, pred) _Debug_order_unchecked(first, last, pred)
#define _DEBUG_ORDER_SET_UNWRAPPED(otherIter, first, last, pred) \
_Debug_order_set_unchecked<otherIter>(first, last, pred)
template
<
class
,
class
,
class
>
constexpr
bool
(
&&
,
&&
,
&&
)
_NOEXCEPT_COND(_NOEXCEPT_OPER(_Pred(_Left, _Right)) && _NOEXCEPT_OPER(_Pred(_Right, _Left)))
noexcept
(
noexcept
(
(
,
)) &&
noexcept
(
(
,
)))
{
const
auto
=
static_cast
<
bool
>(
(
,
));
if
(
_Result
)
{
_STL_VERIFY(!_Pred(_Right, _Left), "invalid comparator");
do
{
if
(!
(
,
)) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1113
,
0
,
"%s"
,
"invalid comparator"
)) || (__debugbreak(),
0
)); ::
(
L"\"invalid comparator\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1113
,
0
); }
while
(
false
); } ; }
while
(
false
);
}
return
(
_Result
);
}
template
<
class
,
class
,
class
>
inline
void
(
,
,
&,
)
{
}
template
<
class
,
class
,
class
>
inline
void
(
,
,
&
,
)
{
if
(
!=
)
{
for
(
=
; ++
_Next
!=
;
=
_Next
)
{
_STL_VERIFY(!_Debug_lt_pred(_Pred, *_Next, *_First), "sequence not ordered");
do
{
if
(!
(
, *
_Next
, *
)) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1136
,
0
,
"%s"
,
"sequence not ordered"
)) || (__debugbreak(),
0
)); ::
(
L"\"sequence not ordered\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1136
,
0
); }
while
(
false
); } ; }
while
(
false
);
}
}
}
template
<
class
,
class
,
class
>
inline
void
(
,
,
&&
)
{
(
,
,
,
<
>());
}
template
<
class
,
class
>
inline
void
(
,
,
&,
,
<
0
>)
{
}
template
<
class
,
class
>
inline
void
_Debug_order_set_unchecked2
(
,
,
&
,
,
<
1
>)
{
(
,
,
,
{});
}
template
<
class
,
class
,
class
>
inline
void
_Debug_order_set_unchecked
(
,
,
&&
)
{
_Debug_order_set_unchecked2
(
,
,
,
<
>(),
<
<
<
>,
<
>>::
>());
}
#endif /* _ITERATOR_DEBUG_LEVEL < 2 */
template
<
class
,
class
>
_CONSTEXPR17 void _Advance1(_InIt& _Where, _Diff _Off, input_iterator_tag)
{
_STL_ASSERT(_Off >= 0, "negative advance of non-bidirectional iterator");
do
{
if
(
>=
0
) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1179
,
0
,
"%s"
,
"negative advance of non-bidirectional iterator"
)) || (__debugbreak(),
0
)); ::
(
L"\"negative advance of non-bidirectional iterator\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1179
,
0
); }
while
(
false
); } ; }
while
(
false
);
for
(;
0
<
; --
)
{
++
;
}
}
template
<
class
,
class
>
_CONSTEXPR17 void _Advance1(_BidIt& _Where, _Diff _Off, bidirectional_iterator_tag)
inline
void
(
&
,
,
bidirectional_iterator_tag
)
{
for
(;
0
<
; --
)
{
++
;
}
#pragma warning(suppress: 6294) // Ill-defined for-loop: initial condition does not satisfy test.
#pragma warning(suppress:
6294
)
for
(;
<
0
; ++
)
{
--
;
}
}
template
<
class
,
class
>
_CONSTEXPR17 void _Advance1(_RanIt& _Where, _Diff _Off, random_access_iterator_tag)
inline
void
(
&
,
,
random_access_iterator_tag
)
{
+=
;
}
template
<
class
,
class
>
_CONSTEXPR17 void advance(_InIt& _Where, _Diff _Off)
{
(
,
,
<
<
>>());
}
template
<
class
>
_CONSTEXPR17 _Iter_diff_t<_InIt> _Distance1(_InIt _First, _InIt _Last, input_iterator_tag)
{
<
>
=
0
;
for
(;
!=
; ++
)
{
++
_Off
;
}
return
(
_Off
);
}
template
<
class
>
_CONSTEXPR17 _Iter_diff_t<_RanIt> _Distance1(_RanIt _First, _RanIt _Last, random_access_iterator_tag)
inline
<
>
(
,
,
random_access_iterator_tag
)
{
return
(
-
);
}
template
<
class
>
_NODISCARD _CONSTEXPR17 _Iter_diff_t<_InIt> distance(_InIt _First, _InIt _Last)
{
return
(
(
,
,
<
>()));
}
template
<
class
>
constexpr
(
)
{
return
(++
);
}
template
<
class
>
_NODISCARD _CONSTEXPR17 _InIt next(_InIt _First, _Iter_diff_t<_InIt> _Off = 1)
{
static_assert
(
<
>,
"next requires input iterator"
);
_STD advance(_First, _Off);
return
(
);
}
template
<
class
>
constexpr
(
)
{
return
(--
);
}
template
<
class
>
_NODISCARD _CONSTEXPR17 _BidIt prev(_BidIt _First, _Iter_diff_t<_BidIt> _Off = 1)
{
static_assert
(
<
>,
"prev requires bidirectional iterator"
);
_STD advance(_First, -_Off);
return
(
);
}
template
<
class
>
struct
;
template
<
class
>
constexpr
(
,
)
{
return
(
);
}
template
<
class
>
constexpr
decltype
(
auto
)
(
&&
,
)
{
return (_STD forward<_Iterator>(_Target).operator->());
return
(::
std
::
<
>(
).
operator
->());
}
template
<
class
>
class
{
public
:
using
=
typename
<
>::
;
using
=
typename
<
>::
;
using
=
typename
<
>::
;
using
=
typename
<
>::
;
using
=
typename
<
>::
;
using
=
;
_CONSTEXPR17 reverse_iterator()
: current()
{
}
_CONSTEXPR17 explicit reverse_iterator(_BidIt _Right)
: current(
)
{
}
template
<
class
>
_CONSTEXPR17 reverse_iterator(const reverse_iterator<_Other>& _Right)
: current(
.
())
{
}
template
<
class
>
_CONSTEXPR17 reverse_iterator& operator=(const reverse_iterator<_Other>& _Right)
{
=
.
();
return
(*
this
);
}
_NODISCARD _CONSTEXPR17 _BidIt base() const
{
return
(
);
}
_NODISCARD _CONSTEXPR17 reference operator*() const
{
=
;
return
(*--
_Tmp
);
}
_NODISCARD _CONSTEXPR17 pointer operator->() const
{
=
;
--
_Tmp
;
return
(
(
_Tmp
,
<
>()));
}
_CONSTEXPR17 reverse_iterator& operator++()
{
--
;
return
(*
this
);
}
_CONSTEXPR17 reverse_iterator operator++(int)
{
= *
this
;
--
;
return
(
_Tmp
);
}
_CONSTEXPR17 reverse_iterator& operator--()
{
++
;
return
(*
this
);
}
_CONSTEXPR17 reverse_iterator operator--(int)
{
= *
this
;
++
;
return
(
_Tmp
);
}
_CONSTEXPR17 reverse_iterator& operator+=(const difference_type _Off)
{
-=
;
return
(*
this
);
}
_NODISCARD _CONSTEXPR17 reverse_iterator operator+(const difference_type _Off) const
{
return
(
(
-
));
}
_CONSTEXPR17 reverse_iterator& operator-=(const difference_type _Off)
{
+=
;
return
(*
this
);
}
_NODISCARD _CONSTEXPR17 reverse_iterator operator-(const difference_type _Off) const
{
return
(
(
+
));
}
_NODISCARD _CONSTEXPR17 reference operator[](const difference_type _Off) const
{
return
(
(*
this
));
}
template
<
class
=
,
<
<
>,
int
> =
0
>
constexpr
void
(
const
)
const
{
_STL_VERIFY(_Off != _Min_possible_v<difference_type>, "integer overflow");
do
{
if
(
<
>) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1406
,
0
,
"%s"
,
"integer overflow"
)) || (__debugbreak(),
0
)); ::
(
L"\"integer overflow\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1406
,
0
); }
while
(
false
); } ; }
while
(
false
);
._Verify_offset(-
);
}
template
<
class
=
,
<
<
>,
int
> =
0
>
_NODISCARD constexpr reverse_iterator<_Unwrapped_t<_BidIt2>> _Unwrapped() const
{
return
(
static_cast
<
<
<
>>>(
._Unwrapped()));
}
static
constexpr
bool
=
_Do_unwrap_when_unverified_v
<
>;
template
<
class
,
<
<
,
>,
int
> =
0
>
constexpr
void
(
const
<
>&
)
{
._Seek_to(
.
());
}
protected
:
;
};
template
<
class
,
class
,
<
<
,
>,
int
> =
0
>
constexpr
void
(
const
<
>&
,
const
<
>&
)
{
(
.
(),
.
());
}
template
<
class
>
_NODISCARD _CONSTEXPR17 reverse_iterator<_BidIt> operator+(
typename
<
>::
,
const
<
>&
)
{
return
(
);
}
template
<
class
,
class
>
_NODISCARD _CONSTEXPR17 auto operator-(const reverse_iterator<_BidIt1>& _Left,
const
<
>&
)
->
decltype
(
.
() -
.
())
{
return
(
.
() -
.
());
}
template
<
class
,
class
>
_NODISCARD _CONSTEXPR17 bool operator==(const reverse_iterator<_BidIt1>& _Left,
const
<
>&
)
{
return
(
.
() ==
.
());
}
template
<
class
,
class
>
_NODISCARD _CONSTEXPR17 bool operator!=(const reverse_iterator<_BidIt1>& _Left,
const
<
>&
)
{
return
(!(
));
}
template
<
class
,
class
>
_NODISCARD _CONSTEXPR17 bool operator<(const reverse_iterator<_BidIt1>& _Left,
const
<
>&
)
{
return
(
.
() <
.
());
}
template
<
class
,
class
>
_NODISCARD _CONSTEXPR17 bool operator>(const reverse_iterator<_BidIt1>& _Left,
const
<
>&
)
{
return
(
);
}
template
<
class
,
class
>
_NODISCARD _CONSTEXPR17 bool operator<=(const reverse_iterator<_BidIt1>& _Left,
const
<
>&
)
{
return
(!(
));
}
template
<
class
,
class
>
_NODISCARD _CONSTEXPR17 bool operator>=(const reverse_iterator<_BidIt1>& _Left,
const
<
>&
)
{
return
(!(
));
}
template
<
class
>
_NODISCARD _CONSTEXPR17 reverse_iterator<_BidIt> make_reverse_iterator(_BidIt _Iter)
{
return
(
<
>(
));
}
template
<
class
>
_NODISCARD _CONSTEXPR17 auto begin(_Container& _Cont) -> decltype(_Cont.begin())
inline
auto
(
&
) ->
decltype
(
.begin())
{
return
(
.begin());
}
template
<
class
>
_NODISCARD _CONSTEXPR17 auto begin(const _Container& _Cont) -> decltype(_Cont.begin())
inline
auto
(
const
&
) ->
decltype
(
.begin())
{
return
(
.begin());
}
template
<
class
>
_NODISCARD _CONSTEXPR17 auto end(_Container& _Cont) -> decltype(_Cont.end())
inline
auto
(
&
) ->
decltype
(
.end())
{
return
(
.end());
}
template
<
class
>
_NODISCARD _CONSTEXPR17 auto end(const _Container& _Cont) -> decltype(_Cont.end())
inline
auto
(
const
&
) ->
decltype
(
.end())
{
return
(
.end());
}
template
<
class
,
>
_NODISCARD constexpr _Ty *begin(_Ty (&_Array)[_Size]) noexcept
constexpr
*
(
(&
)[
])
noexcept
{
return
(
);
}
template
<
class
,
>
_NODISCARD constexpr _Ty *end(_Ty (&_Array)[_Size]) noexcept
constexpr
*
(
(&
)[
])
noexcept
{
return
(
+
);
}
template
<
class
>
_NODISCARD constexpr auto cbegin(const _Container& _Cont)
constexpr
auto
(
const
&
)
_NOEXCEPT_COND(_NOEXCEPT_OPER(_STD begin(_Cont)))
noexcept
(
noexcept
(::
std
::
(
)))
-> decltype(_STD begin(_Cont))
{
return (_STD begin(_Cont));
}
template
<
class
>
_NODISCARD constexpr auto cend(const _Container& _Cont)
constexpr
auto
(
const
&
)
_NOEXCEPT_COND(_NOEXCEPT_OPER(_STD end(_Cont)))
noexcept
(
noexcept
(::
std
::
(
)))
-> decltype(_STD end(_Cont))
{
return (_STD end(_Cont));
}
template
<
class
>
_NODISCARD _CONSTEXPR17 auto rbegin(_Container& _Cont) -> decltype(_Cont.rbegin())
inline
auto
(
&
) ->
decltype
(
.rbegin())
{
return
(
.rbegin());
}
template
<
class
>
_NODISCARD _CONSTEXPR17 auto rbegin(const _Container& _Cont) -> decltype(_Cont.rbegin())
inline
auto
(
const
&
) ->
decltype
(
.rbegin())
{
return
(
.rbegin());
}
template
<
class
>
_NODISCARD _CONSTEXPR17 auto rend(_Container& _Cont) -> decltype(_Cont.rend())
inline
auto
(
&
) ->
decltype
(
.rend())
{
return
(
.rend());
}
template
<
class
>
_NODISCARD _CONSTEXPR17 auto rend(const _Container& _Cont) -> decltype(_Cont.rend())
inline
auto
(
const
&
) ->
decltype
(
.rend())
{
return
(
.rend());
}
template
<
class
,
>
_NODISCARD _CONSTEXPR17 reverse_iterator<_Ty *> rbegin(_Ty (&_Array)[_Size])
{
return
(
<
*>(
+
));
}
template
<
class
,
>
_NODISCARD _CONSTEXPR17 reverse_iterator<_Ty *> rend(_Ty (&_Array)[_Size])
{
return
(
<
*>(
));
}
template
<
class
>
_NODISCARD _CONSTEXPR17 reverse_iterator<const _Elem *>
(
<
>
)
{
return
(
<
const
*>(
.
()));
}
template
<
class
>
_NODISCARD _CONSTEXPR17 reverse_iterator<const _Elem *>
(
<
>
)
{
return
(
<
const
*>(
.
()));
}
template
<
class
>
_NODISCARD _CONSTEXPR17 auto crbegin(const _Container& _Cont)
-> decltype(_STD rbegin(_Cont))
{
return (_STD rbegin(_Cont));
}
template
<
class
>
_NODISCARD _CONSTEXPR17 auto crend(const _Container& _Cont)
-> decltype(_STD rend(_Cont))
{
return (_STD rend(_Cont));
}
template
<
class
>
_NODISCARD constexpr auto size(const _Container& _Cont)
constexpr
auto
(
const
&
)
->
decltype
(
.size())
{
return
(
.size());
}
template
<
class
,
>
_NODISCARD constexpr size_t size(const _Ty(&)[_Size]) noexcept
constexpr
(
const
(&)[
])
noexcept
{
return
(
);
}
template
<
class
>
_NODISCARD constexpr auto empty(const _Container& _Cont)
constexpr
auto
(
const
&
)
->
decltype
(
.empty())
{
return
(
.empty());
}
template
<
class
,
>
_NODISCARD constexpr bool empty(const _Ty(&)[_Size]) noexcept
constexpr
bool
(
const
(&)[
])
noexcept
{
return
(
false
);
}
template
<
class
>
_NODISCARD constexpr bool empty(
<
>
)
noexcept
{
return
(
.
()
0
);
}
template
<
class
>
_NODISCARD constexpr auto data(_Container& _Cont)
->
decltype
(
.data())
{
return
(
.data());
}
template
<
class
>
_NODISCARD constexpr auto data(const _Container& _Cont)
constexpr
auto
(
const
&
)
->
decltype
(
.data())
{
return
(
.data());
}
template
<
class
,
>
_NODISCARD constexpr _Ty *data(_Ty(&_Array)[_Size]) noexcept
constexpr
*
(
(&
)[
])
noexcept
{
return
(
);
}
template
<
class
>
_NODISCARD constexpr const _Elem *data(
<
>
)
noexcept
{
return
(
.
());
}
#define _STL_VERIFY_ARRAY_SIZE(_Array, _Desired) \
_STL_VERIFY((_STD size(_Array) >= static_cast<common_type_t<size_t, \
decltype(_Desired)>>(_Desired)), "array too small")
#if _ITERATOR_DEBUG_LEVEL != 0
struct
_Iterator_base12_compatible
{
*
{};
*
{};
};
#endif /* _ITERATOR_DEBUG_LEVEL != 0 */
template
<
class
,
>
class
#if _ITERATOR_DEBUG_LEVEL != 0
:
private
_Iterator_base12_compatible
#endif /* _ITERATOR_DEBUG_LEVEL != 0 */
{
public
:
using
=
random_access_iterator_tag
;
using
=
;
using
=
;
using
=
const
*;
using
=
const
&;
enum
{
=
};
#if _ITERATOR_DEBUG_LEVEL == 0
_CONSTEXPR17 _Array_const_iterator()
: _Ptr()
{ // construct with null pointer
}
_CONSTEXPR17 explicit _Array_const_iterator(pointer _Parg, size_t _Off = 0)
: _Ptr(_Parg + _Off)
{ // construct with pointer and offset
}
_NODISCARD _CONSTEXPR17 reference operator*() const
{ // return designated object
return (*_Ptr);
}
_NODISCARD _CONSTEXPR17 pointer operator->() const
{ // return pointer to class object
return (_Ptr);
}
_CONSTEXPR17 _Array_const_iterator& operator++()
{ // preincrement
++_Ptr;
return (*this);
}
_CONSTEXPR17 _Array_const_iterator operator++(int)
{ // postincrement
_Array_const_iterator _Tmp = *this;
++*this;
return (_Tmp);
}
_CONSTEXPR17 _Array_const_iterator& operator--()
{ // predecrement
--_Ptr;
return (*this);
}
_CONSTEXPR17 _Array_const_iterator operator--(int)
{ // postdecrement
_Array_const_iterator _Tmp = *this;
--*this;
return (_Tmp);
}
_CONSTEXPR17 _Array_const_iterator& operator+=(const ptrdiff_t _Off)
{ // increment by integer
_Ptr += _Off;
return (*this);
}
_NODISCARD _CONSTEXPR17 _Array_const_iterator operator+(const ptrdiff_t _Off) const
{ // return this + integer
_Array_const_iterator _Tmp = *this;
return (_Tmp += _Off);
}
_CONSTEXPR17 _Array_const_iterator& operator-=(const ptrdiff_t _Off)
{ // decrement by integer
return (*this += -_Off);
}
_NODISCARD _CONSTEXPR17 _Array_const_iterator operator-(const ptrdiff_t _Off) const
{ // return this - integer
_Array_const_iterator _Tmp = *this;
return (_Tmp -= _Off);
}
_NODISCARD _CONSTEXPR17 ptrdiff_t operator-(const _Array_const_iterator& _Right) const
{ // return difference of iterators
return (_Ptr - _Right._Ptr);
}
_NODISCARD _CONSTEXPR17 reference operator[](const ptrdiff_t _Off) const
{ // subscript
return (*(*this + _Off));
}
_NODISCARD _CONSTEXPR17 bool operator==(const _Array_const_iterator& _Right) const
{ // test for iterator equality
return (_Ptr == _Right._Ptr);
}
_NODISCARD _CONSTEXPR17 bool operator!=(const _Array_const_iterator& _Right) const
{ // test for iterator inequality
return (!(*this == _Right));
}
_NODISCARD _CONSTEXPR17 bool operator<(const _Array_const_iterator& _Right) const
{ // test if this < _Right
return (_Ptr < _Right._Ptr);
}
_NODISCARD _CONSTEXPR17 bool operator>(const _Array_const_iterator& _Right) const
{ // test if this > _Right
return (_Right < *this);
}
_NODISCARD _CONSTEXPR17 bool operator<=(const _Array_const_iterator& _Right) const
{ // test if this <= _Right
return (!(_Right < *this));
}
_NODISCARD _CONSTEXPR17 bool operator>=(const _Array_const_iterator& _Right) const
{ // test if this >= _Right
return (!(*this < _Right));
}
_NODISCARD constexpr pointer _Unwrapped() const
{
return (_Ptr);
}
static constexpr bool _Unwrap_when_unverified = true;
constexpr void _Seek_to(pointer _It)
{
_Ptr = _It;
}
private:
pointer _Ptr; // beginning of array
#else /* ^^^ _ITERATOR_DEBUG_LEVEL == 0 ^^^ // vvv _ITERATOR_DEBUG_LEVEL != 0 vvv */
_CONSTEXPR17 _Array_const_iterator()
: _Ptr(),
_Idx(
0
)
{
}
_CONSTEXPR17 explicit _Array_const_iterator(pointer _Parg, size_t _Off = 0)
: _Ptr(
),
_Idx(
)
{
}
_NODISCARD _CONSTEXPR17 reference operator*() const
{
return
(*
));
}
_NODISCARD _CONSTEXPR17 pointer operator->() const
{
_STL_VERIFY(_Ptr, "cannot dereference value-initialized array iterator");
do
{
if
(
) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1872
,
0
,
"%s"
,
"cannot dereference value-initialized array iterator"
)) || (__debugbreak(),
0
)); ::
(
L"\"cannot dereference value-initialized array iterator\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1872
,
0
); }
while
(
false
); } ; }
while
(
false
);
_STL_VERIFY(_Idx < _Size, "cannot dereference out of range array iterator");
do
{
if
(
) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1873
,
0
,
"%s"
,
"cannot dereference out of range array iterator"
)) || (__debugbreak(),
0
)); ::
(
L"\"cannot dereference out of range array iterator\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1873
,
0
); }
while
(
false
); } ; }
while
(
false
);
return
(
+
);
}
_CONSTEXPR17 _Array_const_iterator& operator++()
{
_STL_VERIFY(_Ptr, "cannot increment value-initialized array iterator");
do
{
if
(
) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1879
,
0
,
"%s"
,
"cannot increment value-initialized array iterator"
)) || (__debugbreak(),
0
)); ::
(
L"\"cannot increment value-initialized array iterator\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1879
,
0
); }
while
(
false
); } ; }
while
(
false
);
_STL_VERIFY(_Idx < _Size, "cannot increment array iterator past end");
do
{
if
(
) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1880
,
0
,
"%s"
,
"cannot increment array iterator past end"
)) || (__debugbreak(),
0
)); ::
(
L"\"cannot increment array iterator past end\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1880
,
0
); }
while
(
false
); } ; }
while
(
false
);
++
;
return
(*
this
);
}
_CONSTEXPR17 _Array_const_iterator operator++(int)
{
= *
this
;
*
this
;
return
(
_Tmp
);
}
_CONSTEXPR17 _Array_const_iterator& operator--()
{
_STL_VERIFY(_Ptr, "cannot decrement value-initialized array iterator");
do
{
if
(
) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1894
,
0
,
"%s"
,
"cannot decrement value-initialized array iterator"
)) || (__debugbreak(),
0
)); ::
(
L"\"cannot decrement value-initialized array iterator\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1894
,
0
); }
while
(
false
); } ; }
while
(
false
);
_STL_VERIFY(_Idx != 0, "cannot decrement array iterator before begin");
do
{
if
(
0
) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1895
,
0
,
"%s"
,
"cannot decrement array iterator before begin"
)) || (__debugbreak(),
0
)); ::
(
L"\"cannot decrement array iterator before begin\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1895
,
0
); }
while
(
false
); } ; }
while
(
false
);
--
;
return
(*
this
);
}
_CONSTEXPR17 _Array_const_iterator operator--(int)
{
= *
this
;
*
this
;
return
(
_Tmp
);
}
constexpr
void
(
const
)
const
noexcept
{
if
(
0
)
{
_STL_VERIFY(_Ptr, "cannot seek value-initialized array iterator");
do
{
if
(
) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1911
,
0
,
"%s"
,
"cannot seek value-initialized array iterator"
)) || (__debugbreak(),
0
)); ::
(
L"\"cannot seek value-initialized array iterator\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1911
,
0
); }
while
(
false
); } ; }
while
(
false
);
}
if
(
0
)
{
#pragma warning(suppress: 4146) // unary minus operator applied to unsigned type, result still unsigned
#pragma warning(suppress:
4146
)
_STL_VERIFY(_Idx >= -static_cast<size_t>(_Off),
"cannot seek array iterator before begin");
do
{
if
(
>= -
static_cast
<
>(
)) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1918
,
0
,
"%s"
,
"cannot seek array iterator before begin"
)) || (__debugbreak(),
0
)); ::
(
L"\"cannot seek array iterator before begin\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1918
,
0
); }
while
(
false
); } ; }
while
(
false
);
}
if
(
>
0
)
{
_STL_VERIFY(_Size - _Idx >= static_cast<size_t>(_Off),
"cannot seek array iterator after end");
do
{
if
(
-
>=
static_cast
<
>(
)) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1924
,
0
,
"%s"
,
"cannot seek array iterator after end"
)) || (__debugbreak(),
0
)); ::
(
L"\"cannot seek array iterator after end\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1924
,
0
); }
while
(
false
); } ; }
while
(
false
);
}
}
_CONSTEXPR17 _Array_const_iterator& operator+=(const ptrdiff_t _Off)
{
(
);
+=
;
return
(*
this
);
}
_NODISCARD _CONSTEXPR17 _Array_const_iterator operator+(const ptrdiff_t _Off) const
{
= *
this
;
return
(
_Tmp
);
}
_CONSTEXPR17 _Array_const_iterator& operator-=(const ptrdiff_t _Off)
{
return
(*
this
-
);
}
_NODISCARD _CONSTEXPR17 _Array_const_iterator operator-(const ptrdiff_t _Off) const
{
= *
this
;
return
(
_Tmp
);
}
_NODISCARD _CONSTEXPR17 ptrdiff_t operator-(const _Array_const_iterator& _Right) const
{
(
);
return
(
static_cast
<
>(
-
.
));
}
_NODISCARD _CONSTEXPR17 reference operator[](const ptrdiff_t _Off) const
{
return
(
(*
this
));
}
_NODISCARD _CONSTEXPR17 bool operator==(const _Array_const_iterator& _Right) const
inline
bool
(
const
&
)
const
{
(
);
return
(
.
);
}
_NODISCARD _CONSTEXPR17 bool operator!=(const _Array_const_iterator& _Right) const
inline
bool
(
const
&
)
const
{
return
(!(*
this
));
}
_NODISCARD _CONSTEXPR17 bool operator<(const _Array_const_iterator& _Right) const
inline
bool
(
const
&
)
const
{
(
);
return
(
.
);
}
_NODISCARD _CONSTEXPR17 bool operator>(const _Array_const_iterator& _Right) const
inline
bool
(
const
&
)
const
{
return
(
*
this
);
}
_NODISCARD _CONSTEXPR17 bool operator<=(const _Array_const_iterator& _Right) const
inline
bool
(
const
&
)
const
{
return
(!(
*
this
));
}
_NODISCARD _CONSTEXPR17 bool operator>=(const _Array_const_iterator& _Right) const
inline
bool
(
const
&
)
const
{
return
(!(*
this
));
}
_CONSTEXPR17 void _Compat(const _Array_const_iterator& _Right) const
inline
void
(
const
&
)
const
{
_STL_VERIFY(_Ptr == _Right._Ptr, "array iterators incompatible");
do
{
if
(
.
) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1997
,
0
,
"%s"
,
"array iterators incompatible"
)) || (__debugbreak(),
0
)); ::
(
L"\"array iterators incompatible\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
1997
,
0
); }
while
(
false
); } ; }
while
(
false
);
}
_NODISCARD constexpr pointer _Unwrapped() const
{
return
(
+
);
}
constexpr
void
(
const
&
)
const
noexcept
{
_STL_VERIFY(*this <= _Last, "array iterator range transposed");
do
{
if
(*
this
) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
2008
,
0
,
"%s"
,
"array iterator range transposed"
)) || (__debugbreak(),
0
)); ::
(
L"\"array iterator range transposed\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
2008
,
0
); }
while
(
false
); } ; }
while
(
false
);
}
constexpr
void
(
)
{
=
static_cast
<
>(
-
);
}
private
:
;
;
#endif /* _ITERATOR_DEBUG_LEVEL == 0 */
};
#if _ITERATOR_DEBUG_LEVEL != 0
template
<
class
,
>
constexpr
void
(
const
<
,
>&
,
const
<
,
>&
)
noexcept
{
.
(
);
}
#endif /* _ITERATOR_DEBUG_LEVEL != 0 */
template
<
class
,
>
_NODISCARD _CONSTEXPR17 _Array_const_iterator<_Ty, _Size> operator+(
,
<
,
>
)
{
return
(
);
}
template
<
class
,
>
class
:
public
<
,
>
{
public
:
using
=
<
,
>;
using
=
random_access_iterator_tag
;
using
=
;
using
=
;
using
=
*;
using
=
&;
_CONSTEXPR17 _Array_iterator()
{
}
_CONSTEXPR17 explicit _Array_iterator(pointer _Parg, size_t _Off = 0)
:
(
,
)
{
}
enum
{
=
};
_NODISCARD _CONSTEXPR17 reference operator*() const
{
return
(
const_cast
<
>(
::
)));
}
_NODISCARD _CONSTEXPR17 pointer operator->() const
{
return
(
const_cast
<
>(
::
)));
}
_CONSTEXPR17 _Array_iterator& operator++()
{
*
static_cast
<
*>(
this
);
return
(*
this
);
}
_CONSTEXPR17 _Array_iterator operator++(int)
{
= *
this
;
*
this
;
return
(
_Tmp
);
}
_CONSTEXPR17 _Array_iterator& operator--()
{
*
static_cast
<
*>(
this
);
return
(*
this
);
}
_CONSTEXPR17 _Array_iterator operator--(int)
{
= *
this
;
*
this
;
return
(
_Tmp
);
}
_CONSTEXPR17 _Array_iterator& operator+=(const ptrdiff_t _Off)
{
*
static_cast
<
*>(
this
)
;
return
(*
this
);
}
_NODISCARD _CONSTEXPR17 _Array_iterator operator+(const ptrdiff_t _Off) const
{
= *
this
;
return
(
_Tmp
);
}
_CONSTEXPR17 _Array_iterator& operator-=(const ptrdiff_t _Off)
{
return
(*
this
-
);
}
_NODISCARD _CONSTEXPR17 _Array_iterator operator-(const ptrdiff_t _Off) const
{
= *
this
;
return
(
_Tmp
);
}
_NODISCARD _CONSTEXPR17 ptrdiff_t operator-(const _Mybase& _Right) const
{
return
(*
static_cast
<
const
*>(
this
)
);
}
_NODISCARD _CONSTEXPR17 reference operator[](const ptrdiff_t _Off) const
{
return
(
(*
this
));
}
_NODISCARD constexpr pointer _Unwrapped() const
{
return
(
const_cast
<
>(
::
()));
}
};
template
<
class
,
>
_NODISCARD _CONSTEXPR17 _Array_iterator<_Ty, _Size> operator+(
,
<
,
>
)
{
return
(
);
}
template
<
class
>
class
{
public
:
using
=
typename
<
>::
;
using
=
typename
<
>::
;
using
=
typename
<
>::
;
using
=
;
using
=
typename
<
>::
;
using
=
<
<
>,
<
>&&,
>;
using
=
;
_CONSTEXPR17 move_iterator()
: current()
{
}
_CONSTEXPR17 explicit move_iterator(iterator_type _Right)
: current(
)
{
}
template
<
class
>
_CONSTEXPR17 move_iterator(const move_iterator<_Iter2>& _Right)
: current(
.
())
{
}
template
<
class
>
_CONSTEXPR17 move_iterator& operator=(const move_iterator<_Iter2>& _Right)
{
=
.
();
return
(*
this
);
}
_NODISCARD _CONSTEXPR17 _Iter base() const
{
return
(
);
}
_NODISCARD _CONSTEXPR17 reference operator*() const
{
return
(
static_cast
<
>(*
));
}
_NODISCARD _CONSTEXPR17 pointer operator->() const
{
return
(
);
}
_CONSTEXPR17 move_iterator& operator++()
{
++
;
return
(*
this
);
}
_CONSTEXPR17 move_iterator operator++(int)
{
= *
this
;
++
;
return
(
_Tmp
);
}
_CONSTEXPR17 move_iterator& operator--()
{
--
;
return
(*
this
);
}
_CONSTEXPR17 move_iterator operator--(int)
{
= *
this
;
--
;
return
(
_Tmp
);
}
_CONSTEXPR17 move_iterator& operator+=(const difference_type _Off)
{
+=
;
return
(*
this
);
}
_NODISCARD _CONSTEXPR17 move_iterator operator+(const difference_type _Off) const
{
return
(
(
+
));
}
_CONSTEXPR17 move_iterator& operator-=(const difference_type _Off)
{
-=
;
return
(*
this
);
}
_NODISCARD _CONSTEXPR17 move_iterator operator-(const difference_type _Off) const
{
return
(
(
-
));
}
_NODISCARD _CONSTEXPR17 reference operator[](const difference_type _Off) const
{
return (_STD move(current[_Off]));
}
template
<
class
,
<
<
,
>,
int
> =
0
>
friend
constexpr
void
(
const
&
,
const
<
>&
)
{
(
.
(),
.
());
}
template
<
class
=
,
<
<
>,
int
> =
0
>
constexpr
void
(
const
)
const
{
._Verify_offset(
);
}
template
<
class
=
,
<
<
>,
int
> =
0
>
_NODISCARD constexpr move_iterator<_Unwrapped_t<_Iter2>> _Unwrapped() const
{
return
(
static_cast
<
<
<
>>>(
._Unwrapped()));
}
static
constexpr
bool
=
_Do_unwrap_when_unverified_v
<
>;
template
<
class
,
<
<
,
>,
int
> =
0
>
constexpr
void
(
const
<
>&
)
{
._Seek_to(
.
());
}
protected
:
;
};
template
<
class
>
_NODISCARD _CONSTEXPR17 move_iterator<_Iter> operator+(
typename
<
>::
,
const
<
>&
)
{
return
(
);
}
template
<
class
,
class
>
_NODISCARD _CONSTEXPR17 auto operator-(
const
<
>&
,
const
<
>&
)
->
decltype
(
.
() -
.
())
{
return
(
.
() -
.
());
}
template
<
class
,
class
>
_NODISCARD _CONSTEXPR17 bool operator==(
const
<
>&
,
const
<
>&
)
{
return
(
.
() ==
.
());
}
template
<
class
,
class
>
_NODISCARD _CONSTEXPR17 bool operator!=(
const
<
>&
,
const
<
>&
)
{
return
(!(
));
}
template
<
class
,
class
>
_NODISCARD _CONSTEXPR17 bool operator<(
const
<
>&
,
const
<
>&
)
{
return
(
.
() <
.
());
}
template
<
class
,
class
>
_NODISCARD _CONSTEXPR17 bool operator>(
const
<
>&
,
const
<
>&
)
{
return
(
);
}
template
<
class
,
class
>
_NODISCARD _CONSTEXPR17 bool operator<=(
const
<
>&
,
const
<
>&
)
{
return
(!(
));
}
template
<
class
,
class
>
_NODISCARD _CONSTEXPR17 bool operator>=(
const
<
>&
,
const
<
>&
)
{
return
(!(
));
}
template
<
class
>
_NODISCARD _CONSTEXPR17 move_iterator<_Iter> make_move_iterator(_Iter _It)
{
return
(
<
>(
));
}
template
<
class
>
struct
{
using
=
typename
::char_type;
bool
(
,
)
const
{
return
(
::eq(
,
));
}
};
template
<
class
>
struct
{
using
=
typename
::char_type;
bool
(
,
)
const
{
return
(
::lt(
,
));
}
};
template
<
class
,
class
>
inline
(
,
,
)
{
const
char
*
const
=
const_cast
<
const
char
*>(
reinterpret_cast
<
const
volatile
char
*>(
));
const
char
*
const
=
const_cast
<
const
char
*>(
reinterpret_cast
<
const
volatile
char
*>(
));
char
*
const
=
const_cast
<
char
*>(
reinterpret_cast
<
volatile
char
*>(
));
const
auto
=
static_cast
<
>(
_Last_ch
-
_First_ch
);
_CSTD memmove(_Dest_ch, _First_ch, _Count);
::
(
_Dest_ch
,
_First_ch
,
_Count
);
return
(
reinterpret_cast
<
>(
_Dest_ch
+
_Count
));
}
template
<
class
,
class
>
inline
(
,
,
,
_General_ptr_iterator_tag
)
{
for
(;
!=
; ++
, (
void
)++
)
{
*
= *
;
}
return
(
);
}
template
<
class
,
class
>
inline
(
,
,
,
_Trivially_copyable_ptr_iterator_tag
)
{
return
(
(
,
,
));
}
template
<
class
,
class
>
inline
(
,
,
)
{
return
(
(
,
,
,
(
,
)));
}
template
<
class
,
class
>
inline
(
,
,
)
{
(
,
);
const
auto
=
(
);
const
auto
=
(
);
const
auto
=
(
,
<
>(
_UFirst
,
_ULast
));
(
,
(
_UFirst
,
_ULast
,
_UDest
));
return
(
);
}
#if _ITERATOR_DEBUG_ARRAY_OVERLOADS
template
<
class
,
class
,
>
inline
*
(
,
,
(&
)[
])
{
return (_STD copy(_First, _Last, _Array_iterator<_DestTy, _DestSize>(_Dest))._Unwrapped());
return
(::
std
::
(
,
,
<
,
>(
)).
());
}
#endif /* _ITERATOR_DEBUG_ARRAY_OVERLOADS */
#if _HAS_CXX17
template<class _ExPo,
class _FwdIt1,
class _FwdIt2,
_Enable_if_execution_policy_t<_ExPo> = 0> inline
_FwdIt2 copy(_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _FwdIt2 _Dest) noexcept
{ // copy [_First, _Last) to [_Dest, ...)
// not parallelized as benchmarks show it isn't worth it
_REQUIRE_PARALLEL_ITERATOR(_FwdIt1);
_REQUIRE_PARALLEL_ITERATOR(_FwdIt2);
return (_STD copy(_First, _Last, _Dest));
}
#if _ITERATOR_DEBUG_ARRAY_OVERLOADS
template<class _ExPo,
class _FwdIt1,
class _DestTy,
size_t _DestSize,
_Enable_if_execution_policy_t<_ExPo> = 0> inline
_DestTy *copy(_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _DestTy (&_Dest)[_DestSize]) noexcept
{ // copy [_First, _Last) to [_Dest, ...)
// not parallelized as benchmarks show it isn't worth it
_REQUIRE_PARALLEL_ITERATOR(_FwdIt1);
return (_STD copy(_First, _Last, _Dest));
}
#endif /* _ITERATOR_DEBUG_ARRAY_OVERLOADS */
#endif /* _HAS_CXX17 */
template
<
class
,
class
,
class
>
inline
(
,
,
,
_General_ptr_iterator_tag
)
{
for
(;;)
{
*
= *
;
++
;
--
;
if
(
==
0
)
{
return
(
);
}
++
;
}
}
template
<
class
,
class
,
class
>
inline
(
,
,
,
_Trivially_copyable_ptr_iterator_tag
)
{
return
(
(
,
+
,
));
}
template
<
class
,
class
,
class
>
inline
(
,
,
)
{
return
(
(
,
,
,
(
,
)));
}
template
<
class
,
class
,
class
>
inline
(
,
,
)
{
const
<
>
=
;
if
(
0
_Count
)
{
(
,
(
(
,
_Count
),
_Count
,
(
,
_Count
)));
}
return
(
);
}
#if _ITERATOR_DEBUG_ARRAY_OVERLOADS
template
<
class
,
,
class
,
class
>
inline
(
(&
)[
],
,
)
{
const
<
>
=
;
if
(
0
_Count
)
{
_STL_VERIFY_ARRAY_SIZE(_First, _Count);
do
{
if
((::
std
::
(
) >=
static_cast
<
<
,
decltype
(
_Count
)>>(
_Count
))) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
2557
,
0
,
"%s"
,
"array too small"
)) || (__debugbreak(),
0
)); ::
(
L"\"array too small\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
2557
,
0
); }
while
(
false
); } ; }
while
(
false
);
(
,
(
,
_Count
,
(
,
_Count
)));
}
return
(
);
}
template
<
class
,
class
,
class
,
>
inline
*
(
,
,
(&
)[
])
{
const
<
>
=
;
if
(
0
_Count
)
{
_STL_VERIFY_ARRAY_SIZE(_Dest, _Count);
do
{
if
((::
std
::
(
) >=
static_cast
<
<
,
decltype
(
_Count
)>>(
_Count
))) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
2573
,
0
,
"%s"
,
"array too small"
)) || (__debugbreak(),
0
)); ::
(
L"\"array too small\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
2573
,
0
); }
while
(
false
); } ; }
while
(
false
);
return
(
(
(
,
_Count
),
_Count
,
));
}
return
(
);
}
template
<
class
,
,
class
,
class
,
>
inline
*
(
(&
)[
],
,
(&
)[
])
{
const
<
>
=
;
if
(
0
_Count
)
{
_STL_VERIFY_ARRAY_SIZE(_First, _Count);
do
{
if
((::
std
::
(
) >=
static_cast
<
<
,
decltype
(
_Count
)>>(
_Count
))) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
2590
,
0
,
"%s"
,
"array too small"
)) || (__debugbreak(),
0
)); ::
(
L"\"array too small\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
2590
,
0
); }
while
(
false
); } ; }
while
(
false
);
_STL_VERIFY_ARRAY_SIZE(_Dest, _Count);
do
{
if
((::
std
::
(
) >=
static_cast
<
<
,
decltype
(
_Count
)>>(
_Count
))) { }
else
{
do
{ (
void
) ((
1
(
2
,
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
2591
,
0
,
"%s"
,
"array too small"
)) || (__debugbreak(),
0
)); ::
(
L"\"array too small\""
, __LPREFIX( __FUNCTION__),
L"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
2591
,
0
); }
while
(
false
); } ; }
while
(
false
);
return
(
(
,
_Count
,
));
}
return
(
);
}
#endif /* _ITERATOR_DEBUG_ARRAY_OVERLOADS */
#if _HAS_CXX17
template<class _ExPo,
class _FwdIt1,
class _Diff,
class _FwdIt2,
_Enable_if_execution_policy_t<_ExPo> = 0> inline
_FwdIt2 copy_n(_ExPo&&, _FwdIt1 _First, _Diff _Count_raw, _FwdIt2 _Dest) noexcept
{ // copy [_First, _First + _Count) to [_Dest, ...)
// not parallelized as benchmarks show it isn't worth it
_REQUIRE_PARALLEL_ITERATOR(_FwdIt1);
_REQUIRE_PARALLEL_ITERATOR(_FwdIt2);
return (_STD copy_n(_First, _Count_raw, _Dest));
}
#if _ITERATOR_DEBUG_ARRAY_OVERLOADS
template<class _ExPo,
class _SourceTy,
size_t _SourceSize,
class _Diff,
class _FwdIt2,
_Enable_if_execution_policy_t<_ExPo> = 0> inline
_FwdIt2 copy_n(_ExPo&&, _SourceTy (&_First)[_SourceSize], _Diff _Count_raw, _FwdIt2 _Dest) noexcept
{ // copy [_First, _First + _Count) to [_Dest, ...), array source
// not parallelized as benchmarks show it isn't worth it
_REQUIRE_PARALLEL_ITERATOR(_FwdIt2);
return (_STD copy_n(_First, _Count_raw, _Dest));
}
template<class _ExPo,
class _FwdIt1,
class _Diff,
class _DestTy,
size_t _DestSize,
_Enable_if_execution_policy_t<_ExPo> = 0> inline
_DestTy *copy_n(_ExPo&&, _FwdIt1 _First, _Diff _Count_raw, _DestTy (&_Dest)[_DestSize]) noexcept
{ // copy [_First, _First + _Count) to [_Dest, ...), array dest
// not parallelized as benchmarks show it isn't worth it
_REQUIRE_PARALLEL_ITERATOR(_FwdIt1);
return (_STD copy_n(_First, _Count_raw, _Dest));
}
template<class _ExPo,
class _SourceTy,
size_t _SourceSize,
class _Diff,
class _DestTy,
size_t _DestSize,
_Enable_if_execution_policy_t<_ExPo> = 0> inline
_DestTy *copy_n(_ExPo&&, _SourceTy (&_First)[_SourceSize], _Diff _Count_raw, _DestTy (&_Dest)[_DestSize]) noexcept
{ // copy [_First, _First + _Count) to [_Dest, ...), array source/dest
// not parallelized as benchmarks show it isn't worth it
return (_STD copy_n(_First, _Count_raw, _Dest));
}
#endif /* _ITERATOR_DEBUG_ARRAY_OVERLOADS */
#endif /* _HAS_CXX17 */
template
<
class
,
class
>
inline
(
,
,
)
{
const
char
*
const
=
const_cast
<
const
char
*>(
reinterpret_cast
<
const
volatile
char
*>(
));
const
char
*
const
=
const_cast
<
const
char
*>(
reinterpret_cast
<
const
volatile
char
*>(
));
char
*
const
=
const_cast
<
char
*>(
reinterpret_cast
<
volatile
char
*>(
));
const
auto
=
static_cast
<
>(
_Last_ch
-
_First_ch
);
return
(
static_cast
<
>(
_CSTD memmove(_Dest_ch - _Count, _First_ch, _Count)));
::
(
_Dest_ch
-
_Count
,
_First_ch
,
_Count
)));
}
template
<
class
,
class
>
inline
(
,
,
,
_General_ptr_iterator_tag
)
{
while
(
!=
)
*--
= *--
;
return
(
);
}
template
<
class
,
class
>
inline
(
,
,
,
_Trivially_copyable_ptr_iterator_tag
)
{
return
(
(
,
,
));
}
template
<
class
,
class
>
inline
(
,
,
)
{
(
,
);
const
auto
=
(
);
const
auto
=
(
);
const
auto
=
(
, -
<
>(
_UFirst
,
_ULast
));
(
,
(
_UFirst
,
_ULast
,
_UDest
,
(
_UFirst
,
_UDest
)));
return
(
);
}
#if _HAS_CXX17
template<class _ExPo,
class _BidIt1,
class _BidIt2,
_Enable_if_execution_policy_t<_ExPo> = 0> inline
_BidIt2 copy_backward(_ExPo&&, _BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest) noexcept
{ // copy [_First, _Last) backwards to [..., _Dest)
// not parallelized as benchmarks show it isn't worth it
return (_STD copy_backward(_First, _Last, _Dest));
}
#endif /* _HAS_CXX17 */
template
<
class
,
class
>
inline
(
,
,
,
_General_ptr_iterator_tag
)
{
for
(;
!=
; ++
, (
void
)++
)
*_Dest = _STD move(*_First);
return
(
);
}
template
<
class
,
class
>
inline
(
,
,
,
_Trivially_copyable_ptr_iterator_tag
)
{
return
(
(
,
,
));
}
template
<
class
,
class
>
inline
(
,
,
)
{
return
(
(
,
,
,
(
,
)));
}
template
<
class
,
class
>
inline
(
,
,
)
{
(
,
);
const
auto
=
(
);
const
auto
=
(
);
const
auto
=
(
,
<
>(
_UFirst
,
_ULast
));
(
,
(
_UFirst
,
_ULast
,
_UDest
));
return
(
);
}
#if _ITERATOR_DEBUG_ARRAY_OVERLOADS
template
<
class
,
class
,
>
inline
*
(
,
,
(&
)[
])
{
return (_STD move(_First, _Last, _Array_iterator<_DestTy, _DestSize>(_Dest))._Unwrapped());
return
(::
std
::
(
,
,
<
,
>(
)).
());
}
#endif /* _ITERATOR_DEBUG_ARRAY_OVERLOADS */
#if _HAS_CXX17
template<class _ExPo,
class _FwdIt1,
class _FwdIt2,
_Enable_if_execution_policy_t<_ExPo> = 0> inline
_FwdIt2 move(_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _FwdIt2 _Dest) noexcept
{ // move [_First, _Last) to [_Dest, ...)
// not parallelized as benchmarks show it isn't worth it
_REQUIRE_PARALLEL_ITERATOR(_FwdIt1);
_REQUIRE_PARALLEL_ITERATOR(_FwdIt2);
return (_STD move(_First, _Last, _Dest));
}
#if _ITERATOR_DEBUG_ARRAY_OVERLOADS
template<class _ExPo,
class _FwdIt1,
class _DestTy,
size_t _DestSize,
_Enable_if_execution_policy_t<_ExPo> = 0> inline
_DestTy *move(_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _DestTy (&_Dest)[_DestSize]) noexcept
{ // move [_First, _Last) to [_Dest, ...)
// not parallelized as benchmarks show it isn't worth it
_REQUIRE_PARALLEL_ITERATOR(_FwdIt1);
return (_STD move(_First, _Last, _Dest));
}
#endif /* _ITERATOR_DEBUG_ARRAY_OVERLOADS */
#endif /* _HAS_CXX17 */
template
<
class
,
class
>
inline
_Move_backward_unchecked1
(
,
,
,
_General_ptr_iterator_tag
)
{
while
(
!=
)
*--_Dest = _STD move(*--_Last);
return
(
);
}
template
<
class
,
class
>
inline
_Move_backward_unchecked1
(
,
,
,
_Trivially_copyable_ptr_iterator_tag
)
{
return
(
(
,
,
));
}
template
<
class
,
class
>
inline
(
,
,
)
{
return
(
_Move_backward_unchecked1
(
,
,
,
(
,
)));
}
template
<
class
,
class
>
inline
(
,
,
)
{
(
,
);
const
auto
=
(
);
const
auto
=
(
);
const
auto
=
(
, -
<
>(
_UFirst
,
_ULast
));
(
,
(
_UFirst
,
_ULast
,
_UDest
));
return
(
);
}
#if _HAS_CXX17
template<class _ExPo,
class _BidIt1,
class _BidIt2,
_Enable_if_execution_policy_t<_ExPo> = 0> inline
_BidIt2 move_backward(_ExPo&&, _BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest) noexcept
{ // move [_First, _Last) backwards to [..., _Dest)
// not parallelized as benchmarks show it isn't worth it
return (_STD move_backward(_First, _Last, _Dest));
}
#endif /* _HAS_CXX17 */
template
<
class
>
struct
:
{
};
template
<>
struct
<
char
>
:
{
};
template
<>
struct
<
signed
char
>
:
{
};
template
<>
struct
<
unsigned
char
>
:
{
};
template
<
class
,
class
>
struct
_Fill_memset_is_safe_helper
{
using
=
<
>;
using
=
<
>;
using
=
<
>;
using
=
<
<
<
>,
<
<
<
>,
<
>>,
<
<
bool
,
>,
<
bool
,
>>>,
<
,
>>>;
};
template
<
class
,
class
>
inline
typename
_Fill_memset_is_safe_helper
<
,
>::
(
const
&,
const
&)
{
return
{};
}
template
<
class
,
class
>
inline
void
(
,
,
const
&
,
)
{
for
(;
!=
; ++
)
*
=
;
}
template
<
class
,
class
>
inline
void
(
,
,
const
&
,
)
{
_CSTD memset(_First, static_cast<unsigned char>(_Val), static_cast<size_t>(_Last - _First));
::
(
,
static_cast
<
unsigned
char
>(
),
static_cast
<
>(
-
));
}
template
<
class
,
class
>
inline
void
(
,
,
const
&
)
{
(
,
,
,
(
,
));
}
template
<
class
,
class
>
inline
void
(
,
,
const
&
)
{
(
,
);
(
(
),
(
),
);
}
#if _HAS_CXX17
template<class _ExPo,
class _FwdIt,
class _Ty,
_Enable_if_execution_policy_t<_ExPo> = 0> inline
void fill(_ExPo&&, _FwdIt _First, _FwdIt _Last, const _Ty& _Val) noexcept
{ // copy _Val through [_First, _Last)
// not parallelized as benchmarks show it isn't worth it
_REQUIRE_PARALLEL_ITERATOR(_FwdIt);
return (_STD fill(_First, _Last, _Val));
}
#endif /* _HAS_CXX17 */
template
<
class
,
class
,
class
>
inline
(
,
,
const
&
,
)
{
for
(;
0
<
; --
, (
void
)++
)
*
=
;
return
(
);
}
template
<
class
,
class
,
class
>
inline
(
,
,
const
&
,
)
{
_CSTD memset(_Dest, static_cast<unsigned char>(_Val), static_cast<size_t>(_Count));
::
(
,
static_cast
<
unsigned
char
>(
),
static_cast
<
>(
));
return
(
+
);
}
template
<
class
,
class
,
class
>
inline
(
,
,
const
&
)
{
const
<
>
=
;
if
(
0
_Count
)
{
const
auto
=
(
,
_Count
);
(
,
(
_UDest
,
_Count
,
,
(
_UDest
,
)));
}
return
(
);
}
#if _HAS_CXX17
template<class _ExPo,
class _FwdIt,
class _Diff,
class _Ty,
_Enable_if_execution_policy_t<_ExPo> = 0> inline
_FwdIt fill_n(_ExPo&&, _FwdIt _Dest, _Diff _Count_raw, const _Ty& _Val) noexcept
{ // copy _Val _Count times through [_Dest, ...)
// not parallelized as benchmarks show it isn't worth it
_REQUIRE_PARALLEL_ITERATOR(_FwdIt);
return (_STD fill_n(_Dest, _Count_raw, _Val));
}
#endif /* _HAS_CXX17 */
template
<
class
,
class
>
struct
_Value_equality_is_bitwise_equality
:
<
static_cast
<
>(-
1
) ==
static_cast
<
>(-
1
)>
{
};
template
<
class
,
class
,
class
>
struct
_Equal_memcmp_is_safe_helper
:
{
};
template
<
class
,
class
>
struct
_Equal_memcmp_is_safe_helper
<
,
,
<>>
:
<
<
<
,
>,
<
>,
<
>,
<
<
>>,
<
<
>>,
_Value_equality_is_bitwise_equality
<
,
>
>>
{
};
template
<
class
,
class
>
struct
_Equal_memcmp_is_safe_helper
<
*,
*,
<>>
:
<
<
>,
<
>>::
{
};
#if _HAS_STD_BYTE
template<>
struct _Equal_memcmp_is_safe_helper<byte, byte, equal_to<>>
: true_type
{ // allow memcmping std::byte
};
#endif // _HAS_STD_BYTE
template
<
class
>
struct
_Equal_memcmp_is_safe_helper
<
,
,
<
<
>>>
:
_Equal_memcmp_is_safe_helper
<
,
,
<>>::
{
};
template
<
class
>
struct
_Equal_memcmp_is_safe_helper
<
,
,
<
>>
:
_Equal_memcmp_is_safe_helper
<
,
,
<>>::
{
};
template
<
class
,
class
,
class
>
inline
(
const
&,
const
&,
const
&)
{
return
{};
}
template
<
class
,
class
,
class
>
inline
typename
_Equal_memcmp_is_safe_helper
<
<
>,
<
>,
>::
(
*
const
&,
*
const
&,
const
&)
{
return
{};
}
template
<
class
,
class
,
class
>
inline
bool
(
,
const
,
,
,
)
{
for
(;
!=
; ++
, (
void
)++
)
{
if
(!
(*
, *
))
{
return
(
false
);
}
}
return
(
true
);
}
template
<
class
,
class
,
class
>
inline
bool
(
const
,
const
,
const
,
,
)
{
const
auto
=
reinterpret_cast
<
const
char
*>(
);
const
auto
=
reinterpret_cast
<
const
char
*>(
);
const
auto
=
static_cast
<
>(
reinterpret_cast
<
const
char
*>(
) -
_First1_ch
);
return (_CSTD memcmp(_First1_ch, _First2_ch, _Count) == 0);
return
(::
(
_First1_ch
,
_First2_ch
,
_Count
)
0
);
}
template
<
class
,
class
,
class
>
inline
bool
(
const
,
const
,
const
,
)
{
return
(
(
,
,
,
,
(
,
,
)));
}
template
<
class
,
class
,
class
>
_NODISCARD inline bool equal(const _InIt1 _First1, const _InIt1 _Last1,
inline
bool
(
const
,
const
,
const
,
)
{
(
,
);
const
auto
=
(
);
const
auto
=
(
);
const
auto
=
(
,
<
>(
_UFirst1
,
_ULast1
));
return
(
(
_UFirst1
,
_ULast1
,
_UFirst2
,
(
)));
}
#if _ITERATOR_DEBUG_ARRAY_OVERLOADS
template
<
class
,
class
,
,
class
,
<!
<
*,
>,
int
> =
0
>
_NODISCARD inline bool equal(const _InIt1 _First1, const _InIt1 _Last1, _RightTy (&_First2)[_RightSize], _Pr _Pred)
inline
bool
(
const
,
const
,
(&
)[
],
)
{
return (_STD equal(_First1, _Last1,
<
,
>(
),
(
)));
}
#endif /* _ITERATOR_DEBUG_ARRAY_OVERLOADS */
#if _HAS_CXX17
template<class _ExPo,
class _FwdIt1,
class _FwdIt2,
class _Pr,
_Enable_if_execution_policy_t<_ExPo> = 0>
_NODISCARD inline bool equal(_ExPo&& _Exec, const _FwdIt1 _First1, const _FwdIt1 _Last1,
const _FwdIt2 _First2, _Pr _Pred) noexcept;
#if _ITERATOR_DEBUG_ARRAY_OVERLOADS
template<class _ExPo,
class _FwdIt1,
class _RightTy,
size_t _RightSize,
class _Pr,
enable_if_t<is_execution_policy_v<decay_t<_ExPo>> && !is_same_v<_RightTy *, _Pr>, int> = 0>
_NODISCARD inline bool equal(_ExPo&& _Exec, const _FwdIt1 _First1, const _FwdIt1 _Last1,
_RightTy (&_First2)[_RightSize], _Pr _Pred) noexcept;
#endif /* _ITERATOR_DEBUG_ARRAY_OVERLOADS */
#endif /* _HAS_CXX17 */
template
<
class
,
class
>
_NODISCARD inline bool equal(const _InIt1 _First1, const _InIt1 _Last1, const _InIt2 _First2)
inline
bool
(
const
,
const
,
const
)
{
return (_STD equal(_First1, _Last1, _First2, equal_to<>()));
return
(::
std
::
(
,
,
,
<>()));
}
#if _ITERATOR_DEBUG_ARRAY_OVERLOADS
template
<
class
,
class
,
>
_NODISCARD inline bool equal(const _InIt1 _First1, const _InIt1 _Last1, _RightTy (&_First2)[_RightSize])
inline
bool
(
const
,
const
,
(&
)[
])
{
return (_STD equal(_First1, _Last1, _First2, equal_to<>()));
return
(::
std
::
(
,
,
,
<>()));
}
#endif /* _ITERATOR_DEBUG_ARRAY_OVERLOADS */
#if _HAS_CXX17
template<class _ExPo,
class _FwdIt1,
class _FwdIt2,
_Enable_if_execution_policy_t<_ExPo> = 0>
_NODISCARD inline bool equal(_ExPo&& _Exec, const _FwdIt1 _First1, const _FwdIt1 _Last1,
const _FwdIt2 _First2) noexcept
{ // compare [_First1, _Last1) to [_First2, ...)
return (_STD equal(_STD forward<_ExPo>(_Exec), _First1, _Last1, _First2, equal_to<>()));
}
#if _ITERATOR_DEBUG_ARRAY_OVERLOADS
template<class _ExPo,
class _FwdIt1,
class _RightTy,
size_t _RightSize,
_Enable_if_execution_policy_t<_ExPo> = 0>
_NODISCARD inline bool equal(_ExPo&& _Exec, const _FwdIt1 _First1, const _FwdIt1 _Last1,
_RightTy (&_First2)[_RightSize]) noexcept
{ // compare [_First1, _Last1) to [_First2, ...)
return (_STD equal(_STD forward<_ExPo>(_Exec), _First1, _Last1, _First2, equal_to<>()));
}
#endif /* _ITERATOR_DEBUG_ARRAY_OVERLOADS */
#endif /* _HAS_CXX17 */
template
<
class
,
class
,
class
>
inline
bool
(
,
const
,
,
const
,
,
,
)
{
for
(;;)
{
if
(
==
)
{
return
(
==
);
}
if
(
==
)
{
return
(
false
);
}
if
(!
(*
, *
))
{
return
(
false
);
}
++
;
++
;
}
}
template
<
class
,
class
,
class
>
inline
bool
(
const
,
const
,
const
,
const
,
,
random_access_iterator_tag
,
random_access_iterator_tag
)
{
if
(
-
!=
-
)
{
return
(
false
);
}
return
(
(
,
,
,
));
}
template
<
class
,
class
,
class
>
_NODISCARD inline bool equal(const _InIt1 _First1, const _InIt1 _Last1,
inline
bool
(
const
,
const
,
const
,
const
,
)
{
(
,
);
(
,
);
return
(
(
(
),
(
),
(
),
(
),
(
),
<
>(),
<
>()));
}
#if _HAS_CXX17
template<class _ExPo,
class _FwdIt1,
class _FwdIt2,
class _Pr,
_Enable_if_execution_policy_t<_ExPo> = 0>
_NODISCARD inline bool equal(_ExPo&& _Exec, const _FwdIt1 _First1, const _FwdIt1 _Last1,
const _FwdIt2 _First2, const _FwdIt2 _Last2, _Pr _Pred) noexcept;
#endif /* _HAS_CXX17 */
template
<
class
,
class
>
_NODISCARD inline bool equal(const _InIt1 _First1, const _InIt1 _Last1, const _InIt2 _First2, const _InIt2 _Last2)
inline
bool
(
const
,
const
,
const
,
const
)
{
return (_STD equal(_First1, _Last1, _First2, _Last2, equal_to<>()));
return
(::
std
::
(
,
,
,
,
<>()));
}
#if _HAS_CXX17
template<class _ExPo,
class _FwdIt1,
class _FwdIt2,
_Enable_if_execution_policy_t<_ExPo> = 0>
_NODISCARD inline bool equal(_ExPo&& _Exec, const _FwdIt1 _First1, const _FwdIt1 _Last1,
const _FwdIt2 _First2, const _FwdIt2 _Last2) noexcept
{ // compare [_First1, _Last1) to [_First2, _Last2)
return (_STD equal(_STD forward<_ExPo>(_Exec), _First1, _Last1, _First2, _Last2, equal_to<>()));
}
#endif /* _HAS_CXX17 */
template
<
class
,
class
,
class
>
struct
_Lex_compare_check_element_types_helper
:
<
<
<
>,
<
>,
<
>,
<
>
>>
{
};
template
<
class
,
class
>
struct
_Lex_compare_check_element_types_helper
<
,
,
void
>
:
<
<
<
>,
<
>,
<
>,
<
>
>>
{
};
#if _HAS_STD_BYTE
template<>
struct _Lex_compare_check_element_types_helper<byte, byte, byte>
: true_type
{ // std::byte with builtin functors (e.g. less<byte>) is memcmp safe
};
template<>
struct _Lex_compare_check_element_types_helper<byte, byte, void>
: true_type
{ // std::byte with transparent functors (e.g. less<>) is memcmp safe
};
#endif // _HAS_STD_BYTE
template
<
class
>
struct
{
};
template
<
class
,
class
,
class
,
class
>
using
_Lex_compare_check_element_types
=
<
<
_Lex_compare_check_element_types_helper
<
<
>,
<
>,
>::
,
,
void
>>;
template
<
class
,
class
,
class
>
inline
<
void
>
_Lex_compare_memcmp_classify
(
const
&,
const
&,
const
&)
{
return
{};
}
template
<
class
,
class
,
class
>
inline
_Lex_compare_check_element_types
<
<
int
>,
,
,
>
_Lex_compare_memcmp_classify
(
*
const
&,
*
const
&,
const
<
>&)
{
return
{};
}
template
<
class
,
class
,
class
>
inline
_Lex_compare_check_element_types
<
<
int
>,
,
,
>
_Lex_compare_memcmp_classify
(
*
const
&,
*
const
&,
const
<
>&)
{
return
{};
}
template
<
class
,
class
,
class
>
inline
bool
(
,
,
,
,
,
<
void
>)
{
for
(;
!=
&&
!=
; ++
, (
void
)++
)
{
if (_DEBUG_LT_PRED(_Pred, *_First1, *_First2))
return
(
true
);
else
if
(
(*
, *
))
return
(
false
);
}
return
(
==
&&
!=
);
}
template
<
class
,
class
,
class
,
class
>
inline
bool
(
,
,
,
,
,
<
>)
{
const
auto
=
static_cast
<
>(
-
);
const
auto
=
static_cast
<
>(
-
);
const int _Ans = _CSTD memcmp(_First1, _First2, _Num1 < _Num2 ? _Num1 : _Num2);
const
int
= ::
(
,
,
_Num1
_Num2
?
_Num1
:
_Num2
);
return
(
{}(
_Ans
,
0
) || (
_Ans
0
&&
_Num1
_Num2
));
}
template
<
class
,
class
,
class
>
_NODISCARD inline bool lexicographical_compare(_InIt1 _First1, _InIt1 _Last1,
,
,
)
{
(
,
);
(
,
);
const
auto
=
(
);
const
auto
=
(
);
const
auto
=
(
);
const
auto
=
(
);
return
(
(
_UFirst1
,
_ULast1
,
_UFirst2
,
_ULast2
,
(
),
_Lex_compare_memcmp_classify
(
_UFirst1
,
_UFirst2
,
)));
}
template
<
class
,
class
>
_NODISCARD inline bool lexicographical_compare(_InIt1 _First1, _InIt1 _Last1,
,
)
{
return (_STD lexicographical_compare(_First1, _Last1,
,
,
<>()));
}
#if _HAS_CXX17
template<class _ExPo,
class _FwdIt1,
class _FwdIt2,
class _Pr,
_Enable_if_execution_policy_t<_ExPo> = 0>
_NODISCARD inline bool lexicographical_compare(_ExPo&&, _FwdIt1 _First1, _FwdIt1 _Last1,
_FwdIt2 _First2, _FwdIt2 _Last2, _Pr _Pred) noexcept
{ // order [_First1, _Last1) vs. [_First2, _Last2) using _Pred
// not parallelized at present, parallelism expected to be feasible in a future release
_REQUIRE_PARALLEL_ITERATOR(_FwdIt1);
_REQUIRE_PARALLEL_ITERATOR(_FwdIt2);
return (_STD lexicographical_compare(_First1, _Last1, _First2, _Last2, _Pass_fn(_Pred)));
}
template<class _ExPo,
class _FwdIt1,
class _FwdIt2,
_Enable_if_execution_policy_t<_ExPo> = 0>
_NODISCARD inline bool lexicographical_compare(_ExPo&&, _FwdIt1 _First1, _FwdIt1 _Last1,
_FwdIt2 _First2, _FwdIt2 _Last2) noexcept
{ // order [_First1, _Last1) vs. [_First2, _Last2)
// not parallelized at present, parallelism expected to be feasible in a future release
_REQUIRE_PARALLEL_ITERATOR(_FwdIt1);
_REQUIRE_PARALLEL_ITERATOR(_FwdIt2);
return (_STD lexicographical_compare(_First1, _Last1, _First2, _Last2));
}
#endif /* _HAS_CXX17 */
template
<
class
>
inline
bool
(
const
&
,
,
,
)
{
return (SCHAR_MIN <= _Val && _Val <= SCHAR_MAX);
return
((-
128
) <=
&&
<=
127
);
}
template
<
class
>
inline
bool
(
const
&
,
,
,
)
{
return (_Val <= SCHAR_MAX || static_cast<_Ty>(SCHAR_MIN) <= _Val);
return
(
<=
127
||
static_cast
<
>((-
128
)) <=
);
}
template
<
class
>
inline
bool
(
const
&
,
,
,
)
{
return (_Val <= SCHAR_MAX);
}
template
<
class
>
inline
bool
(
const
&
,
,
,
)
{
return (0 <= _Val && _Val <= UCHAR_MAX);
return
(
0
<=
&&
<=
0xff
);
}
template
<
class
>
inline
bool
(
const
&
,
,
,
)
{
return (_Val <= UCHAR_MAX);
}
template
<
class
,
class
>
inline
bool
(
,
const
&
)
{
using
=
<
>;
return
(
(
,
<
>{},
<
>{},
<-
1
==
static_cast
<
>(-
1
)>{}));
}
template
<
class
>
inline
bool
(
,
const
bool
&)
{
return
(
true
);
}
template
<
class
,
class
>
inline
(
,
const
,
const
&
,
)
{
if
(!
(
,
))
{
return
(
);
}
_First = static_cast<_InIt>(_CSTD memchr(
,
static_cast
<
unsigned
char
>(
),
static_cast
<
>(
-
)));
return
(
?
:
);
}
template
<
class
,
class
>
inline
(
,
const
,
const
&
,
)
{
for
(;
!=
; ++
)
if
(*
==
)
break
;
return
(
);
}
template
<
class
,
class
>
inline
(
const
,
const
,
const
&
)
{
using
=
<
<
> &&
<
,
char
*,
signed
char
*,
unsigned
char
*,
const
char
*,
const
signed
char
*,
const
unsigned
char
*>>;
return
(
(
,
,
,
{}));
}
template
<
class
,
class
>
_NODISCARD inline _InIt find(_InIt _First, const _InIt _Last, const _Ty& _Val)
inline
(
,
const
,
const
&
)
{
(
,
);
(
,
(
(
),
(
),
));
return
(
);
}
#if _HAS_CXX17
template<class _ExPo,
class _FwdIt,
class _Ty,
_Enable_if_execution_policy_t<_ExPo> = 0>
_NODISCARD inline _FwdIt find(_ExPo&& _Exec, _FwdIt _First, const _FwdIt _Last, const _Ty& _Val) noexcept;
#endif /* _HAS_CXX17 */
template
<
class
,
class
,
class
>
inline
(
,
,
const
&
,
)
{
for
(;
!=
; ++
)
{
if
(
(*
,
))
{
break
;
}
}
return
(
);
}
template
<
class
,
class
>
_NODISCARD inline _Iter_diff_t<_InIt> count(const _InIt _First, const _InIt _Last, const _Ty& _Val)
inline
<
>
(
const
,
const
,
const
&
)
{
(
,
);
auto
=
(
);
const
auto
=
(
);
<
>
=
0
;
for
(;
_UFirst
!=
_ULast
; ++
_UFirst
)
{
if
(*
_UFirst
==
)
{
++
_Count
;
}
}
return
(
_Count
);
}
#if _HAS_CXX17
template<class _ExPo,
class _FwdIt,
class _Ty,
_Enable_if_execution_policy_t<_ExPo> = 0>
_NODISCARD inline _Iter_diff_t<_FwdIt> count(_ExPo&& _Exec,
const _FwdIt _First, const _FwdIt _Last, const _Ty& _Val) noexcept;
#endif /* _HAS_CXX17 */
template
<
class
,
class
,
class
>
inline
<
>
(
,
,
const
&
,
)
{
<
>
=
0
;
for
(;
!=
; ++
)
{
if
(
(*
,
))
{
++
_Count
;
}
}
return
(
_Count
);
}
template
<
class
,
class
,
class
>
inline
void
(
&,
&,
,
,
)
{
}
template
<
class
,
class
,
class
>
inline
void
(
&
,
&
,
,
bidirectional_iterator_tag
,
bidirectional_iterator_tag
)
{
do
{
--
;
--
;
}
while
(
(*
, *
));
++
;
++
;
}
template
<
class
,
class
,
class
>
inline
bool
(
,
,
,
,
)
{
(
,
,
,
<
>(),
<
>());
for
(
=
;
_Next1
!=
; ++
_Next1
)
{
if
(
_Next1
==
(
,
_Next1
, *
_Next1
,
))
{
<
>
=
(
,
, *
_Next1
,
);
if
(
_Count2
0
)
{
return
(
false
);
}
=
(
_Next1
);
<
>
=
(
_Skip1
,
, *
_Next1
,
) +
1
;
if
(
_Count2
_Count1
)
{
return
(
false
);
}
}
}
return
(
true
);
}
template
<
class
,
class
,
class
>
inline
bool
_Is_permutation_unchecked
(
,
,
,
)
{
for
(;
!=
; ++
, (
void
)++
)
{
if
(!
(*
, *
))
{
auto _Last2 = _STD next(_First2, static_cast<_Iter_diff_t<_FwdIt2>>(_STD distance(_First1, _Last1)));
auto
= ::
std
::
(
,
static_cast
<
<
>>(::
std
::
(
,
)));
return
(
(
,
,
,
_Last2
,
));
}
}
return
(
true
);
}
template
<
class
,
class
,
class
>
_NODISCARD inline bool is_permutation(_FwdIt1 _First1, _FwdIt1 _Last1,
,
)
{
(
,
);
const
auto
=
(
);
const
auto
=
(
);
const
auto
=
(
,
<
>(
_UFirst1
,
_ULast1
));
return
(
_Is_permutation_unchecked
(
_UFirst1
,
_ULast1
,
_UFirst2
,
(
)));
}
#if _ITERATOR_DEBUG_ARRAY_OVERLOADS
template
<
class
,
class
,
,
class
,
class
=
<!
<
*,
>>>
_NODISCARD inline bool is_permutation(_FwdIt1 _First1, _FwdIt1 _Last1,
(&
)[
],
)
{
return (_STD is_permutation(_First1, _Last1,
<
,
>(
),
(
)));
}
#endif /* _ITERATOR_DEBUG_ARRAY_OVERLOADS */
template
<
class
,
class
>
inline
bool
(
,
,
)
{
return (_STD is_permutation(_First1, _Last1,
,
<>()));
}
#if _ITERATOR_DEBUG_ARRAY_OVERLOADS
template
<
class
,
class
,
>
_NODISCARD inline bool is_permutation(_FwdIt1 _First1, _FwdIt1 _Last1, _RightTy (&_First2)[_RightSize])
{
return (_STD is_permutation(_First1, _Last1, _First2, equal_to<>()));
return
(::
std
::
(
,
,
,
<>()));
}
#endif /* _ITERATOR_DEBUG_ARRAY_OVERLOADS */
template
<
class
,
class
,
class
>
inline
bool
_Is_permutation_unchecked
(
,
,
,
,
,
,
)
{
for
(;
!=
&&
!=
; ++
, (
void
)++
)
{
if
(!
(*
, *
))
{
if (_STD distance(_First1, _Last1) == _STD distance(_First2, _Last2))
if
(::
std
::
(
,
)
::
std
::
(
,
))
{
return
(
(
,
,
,
,
));
}
else
{
return
(
false
);
}
}
}
return
(
==
&&
==
);
}
template
<
class
,
class
,
class
>
inline
bool
_Is_permutation_unchecked
(
,
,
,
,
,
random_access_iterator_tag
,
random_access_iterator_tag
)
{
if
(
-
!=
-
)
{
return
(
false
);
}
return
(
_Is_permutation_unchecked
(
,
,
,
));
}
template
<
class
,
class
,
class
>
_NODISCARD inline bool is_permutation(_FwdIt1 _First1, _FwdIt1 _Last1,
,
,
)
{
(
,
);
(
,
);
return
(
_Is_permutation_unchecked
(
(
),
(
),
(
),
(
),
(
),
<
>(),
<
>()));
}
template
<
class
,
class
>
_NODISCARD inline bool is_permutation(_FwdIt1 _First1, _FwdIt1 _Last1,
,
)
{
return (_STD is_permutation(_First1, _Last1, _First2, _Last2, equal_to<>()));
return
(::
std
::
(
,
,
,
,
<>()));
}
template
<
class
>
inline
void
(
,
,
<
,
0
>)
{
for
(;
!=
&&
!= --
; ++
)
{
_STD iter_swap(_First, _Last);
}
}
#if (defined(_M_IX86) || defined(_M_X64)) && !defined(_M_CEE_PURE) && !defined(_M_HYBRID)
template
<
class
>
inline
void
(
const
,
const
,
<
,
1
>)
{
__std_reverse_trivially_swappable_1
(
,
);
}
template
<
class
>
inline
void
(
const
,
const
,
<
,
2
>)
{
__std_reverse_trivially_swappable_2
(
,
);
}
template
<
class
>
inline
void
(
const
,
const
,
<
,
4
>)
{
__std_reverse_trivially_swappable_4
(
,
);
}
template
<
class
>
inline
void
(
const
,
const
,
<
,
8
>)
{
__std_reverse_trivially_swappable_8
(
,
);
}
#endif /* (defined(_M_IX86) || defined(_M_X64)) && !defined(_M_CEE_PURE) && !defined(_M_HYBRID) */
template
<
class
>
inline
void
(
const
,
const
)
{
#if (defined(_M_IX86) || defined(_M_X64)) && !defined(_M_CEE_PURE) && !defined(_M_HYBRID)
using
=
<
>;
constexpr
=
<
>
&&
_Is_trivially_swappable_v
<
>
&& !
<
>
&& (
sizeof
(
)
1
||
sizeof
(
)
2
||
sizeof
(
)
4
||
sizeof
(
)
8
) ?
sizeof
(
) :
0
;
#else /* ^^^ vectorize ^^^ // vvv no vectorize vvv */
constexpr size_t _Opt = 0;
#endif /* (defined(_M_IX86) || defined(_M_X64)) && !defined(_M_CEE_PURE) && !defined(_M_HYBRID) */
(
,
,
<
,
_Opt
>{});
}
template
<
class
>
inline
void
(
const
,
const
)
{
(
,
);
(
(
),
(
));
}
#if _HAS_CXX17
template<class _ExPo,
class _BidIt,
_Enable_if_execution_policy_t<_ExPo> = 0> inline
void reverse(_ExPo&&, _BidIt _First, _BidIt _Last) noexcept
{ // reverse elements in [_First, _Last)
// not parallelized as benchmarks show it isn't worth it
return (_STD reverse(_First, _Last));
}
#endif /* _HAS_CXX17 */
template
<
class
>
inline
(
,
,
,
)
{
for
(
=
,
=
; ; )
{
_STD iter_swap(_First, _Next);
if
(++
==
)
{
if
(++
_Next
==
)
return
(
_Res
==
?
:
_Res
);
else
=
_Next
;
}
else
if
(++
_Next
==
)
{
if
(
_Res
==
)
_Res
=
;
_Next
=
;
}
}
}
template
<
class
>
inline
<
,
>
_Reverse_until_sentinel_unchecked
(
,
,
)
{
while
(
!=
&&
!=
)
{
_STD iter_swap(_First, --_Last);
++
;
}
return (_STD make_pair(_First, _Last));
}
template
<
class
>
inline
(
,
,
,
bidirectional_iterator_tag
)
{
(
,
);
(
,
);
<
,
>
=
_Reverse_until_sentinel_unchecked
(
,
,
);
(
_Tmp
.
,
_Tmp
.
);
return
(
!=
_Tmp
.
?
_Tmp
.
:
_Tmp
.
);
}
template
<
class
>
inline
(
,
,
,
random_access_iterator_tag
)
{
(
,
);
(
,
);
(
,
);
return
(
+ (
-
));
}
template
<
class
>
inline
(
,
,
)
{
if
(
==
)
return
(
);
if
(
==
)
return
(
);
return
(
(
,
,
,
<
>()));
}
template
<
class
>
inline
(
,
,
)
{
(
,
);
(
,
);
(
,
(
(
),
(
),
(
)));
return
(
);
}
#if _HAS_CXX17
template<class _ExPo,
class _FwdIt,
_Enable_if_execution_policy_t<_ExPo> = 0> inline
_FwdIt rotate(_ExPo&&, _FwdIt _First, _FwdIt _Mid, _FwdIt _Last) noexcept
{ // rotate [_First, _Last) left by distance(_First, _Mid) positions
// not parallelized as benchmarks show it isn't worth it
return (_STD rotate(_First, _Mid, _Last));
}
#endif /* _HAS_CXX17 */
template
<
class
,
class
,
class
>
_NODISCARD inline _FwdIt lower_bound(_FwdIt _First, const _FwdIt _Last,
const
&
,
)
{
(
,
);
auto
=
(
);
_Iter_diff_t<_FwdIt> _Count = _STD distance(_UFirst, _Get_unwrapped(_Last));
<
>
= ::
std
::
(
_UFirst
,
(
));
while
(
0
_Count
)
{
const
<
>
=
_Count
>>
1
;
const auto _UMid = _STD next(_UFirst, _Count2);
const
auto
= ::
std
::
(
_UFirst
,
_Count2
);
if
(
(*
_UMid
,
))
{
_UFirst
=
(
_UMid
);
_Count
-=
_Count2
+
1
;
}
else
{
_Count
=
_Count2
;
}
}
(
,
_UFirst
);
return
(
);
}
template
<
class
,
class
>
class
{
public
:
using
=
<
>;
using
=
typename
::result_type;
using
=
<
sizeof
(
)
sizeof
(
),
,
>;
explicit
(
&
)
: _Ref(_Func), _Bits(CHAR_BIT * sizeof (_Udiff)), _Bmask(_Udiff(-1))
: _Ref(
), _Bits(
8
*
sizeof
(
)), _Bmask(
(-
1
))
{
for
(; (
::max)() - (
::min)() <
;
>>=
1
)
--
;
}
(
)
{
for
(;;)
{
=
0
;
=
0
;
while
(
_Mask
(
-
1
))
{
_Ret
<<=
-
1
;
_Ret
<<=
1
;
_Ret
|=
();
_Mask
<<=
-
1
;
_Mask
<<=
1
;
_Mask
|=
;
}
if
(
_Ret
/
<
_Mask
/
||
_Mask
%
==
(
-
1
))
return
(
static_cast
<
>(
_Ret
%
));
}
}
()
{
=
0
;
for (size_t _Num = 0; _Num < CHAR_BIT * sizeof (_Udiff);
for
(
=
0
;
_Num
8
*
sizeof
(
);
_Num
+=
)
{
_Ret
<<=
-
1
;
_Ret
<<=
1
;
_Ret
|=
();
}
return
(
_Ret
);
}
(
const
&) =
delete
;
&
(
const
&) =
delete
;
private
:
()
{
for
(;;)
{
=
() - (
::min)();
if
(
_Val
<=
)
return
(
_Val
);
}
}
&
;
;
;
};
template
<
class
>
class _CRTIMP2_PURE_IMPORT _Yarn
class
__declspec
(dllimport)
{
public
:
__CLR_OR_THIS_CALL _Yarn()
: _Myptr(
nullptr
), _Nul(
0
)
{
}
__CLR_OR_THIS_CALL _Yarn(const _Yarn& _Right)
: _Myptr(
nullptr
), _Nul(
0
)
{
*
this
;
}
__CLR_OR_THIS_CALL _Yarn(const _Elem * _Right)
: _Myptr(
nullptr
), _Nul(
0
)
{
*
this
;
}
_Yarn& __CLR_OR_THIS_CALL operator=(const _Yarn& _Right)
{
return
(*
this
.
);
}
_Yarn& __CLR_OR_THIS_CALL operator=(const _Elem * _Right)
{
if
(
)
{
();
if
(
!=
nullptr
)
{
const
*
=
;
while
(*
_Ptr
!= (
)
0
)
{
++
_Ptr
;
}
const
auto
= (++
_Ptr
-
) *
sizeof
(
);
#ifdef _DEBUG
_Myptr = (_Elem *)_malloc_dbg(_Count, _CRT_BLOCK,
__FILE__, __LINE__);
"c:\\program files (x86)\\microsoft visual studio\\2017\\professional\\vc\\tools\\msvc\\14.16.27023\\include\\xutility"
,
4125
);
#else /* _DEBUG */
_Myptr = (_Elem *)_CSTD malloc(_Count);
#endif /* _DEBUG */
if
(
!=
nullptr
)
{
_CSTD memcpy(_Myptr, _Right, _Count);
}
}
}
return
(*
this
);
}
__CLR_OR_THIS_CALL ~_Yarn() noexcept
{
();
}
bool __CLR_OR_THIS_CALL empty() const
{
return
(
==
nullptr
);
}
_Ret_z_ const _Elem *__CLR_OR_THIS_CALL c_str() const
{
return
(
!=
nullptr
?
: &
);
}
bool __CLR_OR_THIS_CALL _Empty() const
{
return
(
==
nullptr
);
}
_Ret_z_ const _Elem *__CLR_OR_THIS_CALL _C_str() const
{
return
(
!=
nullptr
?
: &
);
}
private
:
void __CLR_OR_THIS_CALL _Tidy()
{
if
(
!=
nullptr
)
#ifdef _DEBUG
_free_dbg(_Myptr, _CRT_BLOCK);
#else /* _DEBUG */
_CSTD free(_Myptr);
#endif /* _DEBUG */
=
nullptr
;
}
*
;
;
};
template
<
class
>
class
{
public
:
using
=
;
using
=
void
;
using
=
void
;
using
=
void
;
using
=
void
;
using
=
;
explicit
(
&
)
: container(_STD addressof(_Cont))
{
}
&
(
const
typename
::value_type&
)
{
->push_back(
);
return
(*
this
);
}
&
(
typename
::value_type&&
)
{
container->push_back(_STD move(_Val));
return
(*
this
);
}
_NODISCARD back_insert_iterator& operator*()
{
return
(*
this
);
}
&
()
{
return
(*
this
);
}
(
int
)
{
return
(*
this
);
}
protected
:
*
;
};
template
<
class
>
_NODISCARD inline back_insert_iterator<_Container> back_inserter(_Container& _Cont)
{
return
(
<
>(
));
}
template
<
class
,
class
,
class
=
void
>
struct
:
{
};
template
<
class
,
class
>
struct
<
,
,
<
typename
::allocator_type>>
:
<
,
typename
::allocator_type>::
{
};
struct
{
explicit
() =
default
;
};
_INLINE_VAR constexpr allocator_arg_t allocator_arg{};
[[noreturn]] _CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Xbad_alloc();
[[noreturn]]
void
__cdecl
();
[[noreturn]] _CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Xinvalid_argument(_In_z_ const char *);
[[noreturn]]
void
__cdecl
(
const
char
*);
[[noreturn]] _CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Xlength_error(_In_z_ const char *);
[[noreturn]]
void
__cdecl
(
const
char
*);
[[noreturn]] _CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Xout_of_range(_In_z_ const char *);
[[noreturn]]
void
__cdecl
(
const
char
*);
[[noreturn]] _CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Xoverflow_error(_In_z_ const char *);
[[noreturn]]
void
__cdecl
(
const
char
*);
[[noreturn]] _CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Xruntime_error(_In_z_ const char *);
[[noreturn]]
void
__cdecl
(
const
char
*);
template
<
class
,
class
>
struct
:
<
,
>::
{
};
template
<
class
,
class
>
_INLINE_VAR constexpr bool uses_allocator_v = uses_allocator<_Ty, _Alloc>::value;
template
<
class
,
class
,
class
=
,
class
=
*,
class
=
&>
struct _CXX17_DEPRECATE_ITERATOR_BASE_CLASS iterator
{
using
=
;
using
=
;
using
=
;
using
=
;
using
=
;
};
#pragma pop_macro("new")
_STL_RESTORE_CLANG_WARNINGS
#pragma warning(pop)
#pragma warning(pop)
#pragma pack(pop)
#endif /* RC_INVOKED */
#endif /* _XUTILITY_ */
#pragma pack(pop)