STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Macros | Typedefs | Functions | Variables
xutility File Reference
#include <climits>
#include <cstdlib>
#include <utility>

Classes

struct  _Container_base0
 
struct  _Iterator_base0
 
struct  _Container_proxy
 
struct  _Container_base12
 
struct  _Iterator_base12
 
struct  input_iterator_tag
 
struct  _Mutable_iterator_tag
 
struct  output_iterator_tag
 
struct  forward_iterator_tag
 
struct  bidirectional_iterator_tag
 
struct  random_access_iterator_tag
 
struct  _Nonscalar_ptr_iterator_tag
 
struct  _Scalar_ptr_iterator_tag
 
struct  iterator< _Category, _Ty, _Diff, _Pointer, _Reference >
 
struct  _Iterator012< _Category, _Ty, _Diff, _Pointer, _Reference, _Base >
 
struct  iterator_traits< _Iter >
 
struct  iterator_traits< _Ty * >
 
struct  iterator_traits< const _Ty * >
 
struct  _Ptr_cat_helper< _Elem1, _Elem2 >
 
struct  _Ptr_cat_helper< _Elem, _Elem >
 
struct  _Ptr_cat_helper< _Anything *, const _Anything * >
 
struct  pointer_traits< _Ty >
 
class  _Revranit< _RanIt, _Base >
 
class  reverse_iterator< _RanIt >
 
struct  _Is_checked_helper< reverse_iterator< _RanIt > >
 
class  _Array_const_iterator< _Ty, _Size >
 
class  _Array_iterator< _Ty, _Size >
 
class  move_iterator< _RanIt >
 
struct  _Is_checked_helper< move_iterator< _RanIt > >
 
class  _Rng_from_urng< _Diff, _Urng >
 
class  _Yarn< _Elem >
 
struct  _Has_allocator_type< _Ty, _Alloc >
 
struct  allocator_arg_t
 
struct  std::uses_allocator< _Ty, _Alloc >
 

Macros

#define _XUTILITY_
 
#define _DEBUG_ERROR(mesg)
 
#define _UNCHECKED_TYPE(_Iter)   typename _Get_unchecked_type<_Iter>::type
 
#define _DEBUG_LT(x, y)   ((x) < (y))
 
#define _DEBUG_LT_PRED(pred, x, y)   pred(x, y)
 
#define _DEBUG_ORDER(first, last)
 
#define _DEBUG_ORDER_PRED(first, last, pred)
 
#define _DEBUG_POINTER(first)
 
#define _DEBUG_POINTER2(first, file, line)
 
#define _DEBUG_RANGE(first, last)
 
#define _DEBUG_RANGE2(first, last, file, line)
 

Typedefs

typedef _Container_base0 _Container_base
 
typedef _Iterator_base0 _Iterator_base
 
typedef iterator< output_iterator_tag, void, void, void, void_Outit
 

Functions

template<class _Ty >
struct _Get_unchecked_type _GET_TYPE_OR_DEFAULT (_Unchecked_type, _Ty)
 
template<class _Ty >
struct _Is_checked_helper _HAS_ONE_TYPE (_Unchecked_type)
 
template<class _Iter >
_Is_checked_helper< _Iter >::type _Is_checked (_Iter)
 
template<class _Iter >
_Iter _Unchecked (_Iter _Src)
 
template<class _Iter , class _UIter >
_Iter & _Rechecked (_Iter &_Dest, _UIter _Src)
 
template<class _Iter >
iterator_traits< _Iter >::iterator_category _Iter_cat (const _Iter &)
 
template<class _Iter1 , class _Iter2 >
_Nonscalar_ptr_iterator_tag _Ptr_cat (_Iter1 &, _Iter2 &)
 
template<class _Elem1 , class _Elem2 >
_Ptr_cat_helper< _Elem1, _Elem2 >::type _Ptr_cat (_Elem1 *, _Elem2 *)
 
template<class _Elem1 , class _Elem2 >
_Ptr_cat_helper< _Elem1, _Elem2 >::type _Ptr_cat (const _Elem1 *, _Elem2 *)
 
template<class _InIt , class _Diff >
void _Advance (_InIt &_Where, _Diff _Off, input_iterator_tag)
 
template<class _FwdIt , class _Diff >
void _Advance (_FwdIt &_Where, _Diff _Off, forward_iterator_tag)
 
template<class _BidIt , class _Diff >
void _Advance (_BidIt &_Where, _Diff _Off, bidirectional_iterator_tag)
 
template<class _RanIt , class _Diff >
void _Advance (_RanIt &_Where, _Diff _Off, random_access_iterator_tag)
 
template<class _InIt , class _Diff >
void advance (_InIt &_Where, _Diff _Off)
 
template<class _InIt , class _Diff >
void _Distance2 (_InIt _First, _InIt _Last, _Diff &_Off, input_iterator_tag)
 
template<class _FwdIt , class _Diff >
void _Distance2 (_FwdIt _First, _FwdIt _Last, _Diff &_Off, forward_iterator_tag)
 
template<class _BidIt , class _Diff >
void _Distance2 (_BidIt _First, _BidIt _Last, _Diff &_Off, bidirectional_iterator_tag)
 
template<class _RanIt , class _Diff >
void _Distance2 (_RanIt _First, _RanIt _Last, _Diff &_Off, random_access_iterator_tag)
 
template<class _InIt >
iterator_traits< _InIt >::difference_type distance (_InIt _First, _InIt _Last)
 
template<class _InIt , class _Diff >
void _Distance (_InIt _First, _InIt _Last, _Diff &_Off)
 
template<class _FwdIt >
_FwdIt next (_FwdIt _First, typename iterator_traits< _FwdIt >::difference_type _Off=1)
 
template<class _BidIt >
_BidIt prev (_BidIt _First, typename iterator_traits< _BidIt >::difference_type _Off=1)
 
template<class _RanIt , class _Base , class _Diff >
_Revranit< _RanIt, _Base > operator+ (_Diff _Off, const _Revranit< _RanIt, _Base > &_Right)
 
template<class _RanIt1 , class _Base1 , class _RanIt2 , class _Base2 >
auto operator- (const _Revranit< _RanIt1, _Base1 > &_Left, const _Revranit< _RanIt2, _Base2 > &_Right) -> decltype(_Right.base()-_Left.base())
 
template<class _RanIt1 , class _Base1 , class _RanIt2 , class _Base2 >
bool operator== (const _Revranit< _RanIt1, _Base1 > &_Left, const _Revranit< _RanIt2, _Base2 > &_Right)
 
template<class _RanIt1 , class _Base1 , class _RanIt2 , class _Base2 >
bool operator!= (const _Revranit< _RanIt1, _Base1 > &_Left, const _Revranit< _RanIt2, _Base2 > &_Right)
 
template<class _RanIt1 , class _Base1 , class _RanIt2 , class _Base2 >
bool operator< (const _Revranit< _RanIt1, _Base1 > &_Left, const _Revranit< _RanIt2, _Base2 > &_Right)
 
template<class _RanIt1 , class _Base1 , class _RanIt2 , class _Base2 >
bool operator> (const _Revranit< _RanIt1, _Base1 > &_Left, const _Revranit< _RanIt2, _Base2 > &_Right)
 
template<class _RanIt1 , class _Base1 , class _RanIt2 , class _Base2 >
bool operator<= (const _Revranit< _RanIt1, _Base1 > &_Left, const _Revranit< _RanIt2, _Base2 > &_Right)
 
template<class _RanIt1 , class _Base1 , class _RanIt2 , class _Base2 >
bool operator>= (const _Revranit< _RanIt1, _Base1 > &_Left, const _Revranit< _RanIt2, _Base2 > &_Right)
 
template<class _RanIt , class _Diff >
reverse_iterator< _RanIt > operator+ (_Diff _Off, const reverse_iterator< _RanIt > &_Right)
 
template<class _RanIt1 , class _RanIt2 >
auto operator- (const reverse_iterator< _RanIt1 > &_Left, const reverse_iterator< _RanIt2 > &_Right) -> decltype(_Right.base()-_Left.base())
 
template<class _RanIt1 , class _RanIt2 >
bool operator== (const reverse_iterator< _RanIt1 > &_Left, const reverse_iterator< _RanIt2 > &_Right)
 
template<class _RanIt1 , class _RanIt2 >
bool operator!= (const reverse_iterator< _RanIt1 > &_Left, const reverse_iterator< _RanIt2 > &_Right)
 
template<class _RanIt1 , class _RanIt2 >
bool operator< (const reverse_iterator< _RanIt1 > &_Left, const reverse_iterator< _RanIt2 > &_Right)
 
template<class _RanIt1 , class _RanIt2 >
bool operator> (const reverse_iterator< _RanIt1 > &_Left, const reverse_iterator< _RanIt2 > &_Right)
 
template<class _RanIt1 , class _RanIt2 >
bool operator<= (const reverse_iterator< _RanIt1 > &_Left, const reverse_iterator< _RanIt2 > &_Right)
 
template<class _RanIt1 , class _RanIt2 >
bool operator>= (const reverse_iterator< _RanIt1 > &_Left, const reverse_iterator< _RanIt2 > &_Right)
 
template<class _Container >
auto begin (_Container &_Cont) -> decltype(_Cont.begin())
 
template<class _Container >
auto begin (const _Container &_Cont) -> decltype(_Cont.begin())
 
template<class _Container >
auto end (_Container &_Cont) -> decltype(_Cont.end())
 
template<class _Container >
auto end (const _Container &_Cont) -> decltype(_Cont.end())
 
template<class _Ty , size_t _Size>
_Ty * begin (_Ty(&_Array)[_Size])
 
template<class _Ty , size_t _Size>
_Ty * end (_Ty(&_Array)[_Size])
 
template<class _Container >
auto cbegin (const _Container &_Cont) -> decltype(_STD begin(_Cont))
 
template<class _Container >
auto cend (const _Container &_Cont) -> decltype(_STD end(_Cont))
 
template<class _Container >
auto rbegin (_Container &_Cont) -> decltype(_Cont.rbegin())
 
template<class _Container >
auto rbegin (const _Container &_Cont) -> decltype(_Cont.rbegin())
 
template<class _Container >
auto rend (_Container &_Cont) -> decltype(_Cont.rend())
 
template<class _Container >
auto rend (const _Container &_Cont) -> decltype(_Cont.rend())
 
template<class _Ty , size_t _Size>
reverse_iterator< _Ty * > rbegin (_Ty(&_Array)[_Size])
 
template<class _Ty , size_t _Size>
reverse_iterator< _Ty * > rend (_Ty(&_Array)[_Size])
 
template<class _Elem >
reverse_iterator< const _Elem * > rbegin (initializer_list< _Elem > _Ilist)
 
template<class _Elem >
reverse_iterator< const _Elem * > rend (initializer_list< _Elem > _Ilist)
 
template<class _Container >
auto crbegin (const _Container &_Cont) -> decltype(_STD rbegin(_Cont))
 
template<class _Container >
auto crend (const _Container &_Cont) -> decltype(_STD rend(_Cont))
 
template<class _Ty , size_t _Size>
_Array_const_iterator< _Ty, _Size >::_Unchecked_type _Unchecked (_Array_const_iterator< _Ty, _Size > _Iter)
 
template<class _Ty , size_t _Size>
_Array_const_iterator< _Ty, _Size > & _Rechecked (_Array_const_iterator< _Ty, _Size > &_Iter, typename _Array_const_iterator< _Ty, _Size >::_Unchecked_type _Right)
 
template<class _Ty , size_t _Size>
_Array_const_iterator< _Ty, _Sizeoperator+ (typename _Array_const_iterator< _Ty, _Size >::difference_type _Off, _Array_const_iterator< _Ty, _Size > _Next)
 
template<class _Ty , size_t _Size>
_Array_iterator< _Ty, _Size >::_Unchecked_type _Unchecked (_Array_iterator< _Ty, _Size > _Iter)
 
template<class _Ty , size_t _Size>
_Array_iterator< _Ty, _Size > & _Rechecked (_Array_iterator< _Ty, _Size > &_Iter, typename _Array_iterator< _Ty, _Size >::_Unchecked_type _Right)
 
template<class _Ty , size_t _Size>
_Array_iterator< _Ty, _Sizeoperator+ (typename _Array_iterator< _Ty, _Size >::difference_type _Off, _Array_iterator< _Ty, _Size > _Next)
 
template<class _RanIt , class _Diff >
move_iterator< _RanIt > operator+ (_Diff _Off, const move_iterator< _RanIt > &_Right)
 
template<class _RanIt1 , class _RanIt2 >
auto operator- (move_iterator< _RanIt1 > &_Left, const move_iterator< _RanIt2 > &_Right) -> decltype(_Left.base()-_Right.base())
 
template<class _RanIt1 , class _RanIt2 >
bool operator== (const move_iterator< _RanIt1 > &_Left, const move_iterator< _RanIt2 > &_Right)
 
template<class _RanIt1 , class _RanIt2 >
bool operator!= (const move_iterator< _RanIt1 > &_Left, const move_iterator< _RanIt2 > &_Right)
 
template<class _RanIt1 , class _RanIt2 >
bool operator< (const move_iterator< _RanIt1 > &_Left, const move_iterator< _RanIt2 > &_Right)
 
template<class _RanIt1 , class _RanIt2 >
bool operator> (const move_iterator< _RanIt1 > &_Left, const move_iterator< _RanIt2 > &_Right)
 
template<class _RanIt1 , class _RanIt2 >
bool operator<= (const move_iterator< _RanIt1 > &_Left, const move_iterator< _RanIt2 > &_Right)
 
template<class _RanIt1 , class _RanIt2 >
bool operator>= (const move_iterator< _RanIt1 > &_Left, const move_iterator< _RanIt2 > &_Right)
 
template<class _RanIt >
move_iterator< _RanIt > make_move_iterator (_RanIt _Iter)
 
template<class _InIt , class _OutIt >
_OutIt _Copy_impl (_InIt _First, _InIt _Last, _OutIt _Dest, _Nonscalar_ptr_iterator_tag)
 
template<class _InIt , class _OutIt >
_OutIt _Copy_impl (_InIt _First, _InIt _Last, _OutIt _Dest, _Scalar_ptr_iterator_tag)
 
template<class _InIt , class _OutIt >
_OutIt _Copy_impl (_InIt _First, _InIt _Last, _OutIt _Dest)
 
template<class _InIt , class _OutIt >
_OutIt copy (_InIt _First, _InIt _Last, _OutIt _Dest)
 
template<class _InIt , class _Diff , class _OutIt >
_OutIt _Copy_n (_InIt _First, _Diff _Count, _OutIt _Dest, input_iterator_tag)
 
template<class _InIt , class _Diff , class _OutIt >
_OutIt _Copy_n (_InIt _First, _Diff _Count, _OutIt _Dest, forward_iterator_tag)
 
template<class _InIt , class _Diff , class _OutIt >
_OutIt _Copy_n (_InIt _First, _Diff _Count, _OutIt _Dest, _Nonscalar_ptr_iterator_tag)
 
template<class _InIt , class _Diff , class _OutIt >
_OutIt _Copy_n (_InIt _First, _Diff _Count, _OutIt _Dest, _Scalar_ptr_iterator_tag)
 
template<class _InIt , class _Diff , class _OutIt >
_OutIt _Copy_n (_InIt _First, _Diff _Count, _OutIt _Dest)
 
template<class _InIt , class _Diff , class _OutIt >
_OutIt copy_n (_InIt _First, _Diff _Count, _OutIt _Dest)
 
template<class _BidIt1 , class _BidIt2 >
_BidIt2 _Copy_backward (_BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest, _Nonscalar_ptr_iterator_tag)
 
template<class _InIt , class _OutIt >
_OutIt _Copy_backward (_InIt _First, _InIt _Last, _OutIt _Dest, _Scalar_ptr_iterator_tag)
 
template<class _BidIt1 , class _BidIt2 >
_BidIt2 _Copy_backward (_BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest)
 
template<class _BidIt1 , class _BidIt2 >
_BidIt2 copy_backward (_BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest)
 
template<class _InIt , class _OutIt >
_OutIt _Move (_InIt _First, _InIt _Last, _OutIt _Dest, _Nonscalar_ptr_iterator_tag)
 
template<class _InIt , class _OutIt >
_OutIt _Move (_InIt _First, _InIt _Last, _OutIt _Dest, _Scalar_ptr_iterator_tag)
 
template<class _InIt , class _OutIt >
_OutIt _Move (_InIt _First, _InIt _Last, _OutIt _Dest)
 
template<class _InIt , class _OutIt >
_OutIt move (_InIt _First, _InIt _Last, _OutIt _Dest)
 
template<class _BidIt1 , class _BidIt2 >
_BidIt2 _Move_backward (_BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest, _Nonscalar_ptr_iterator_tag)
 
template<class _InIt , class _OutIt >
_OutIt _Move_backward (_InIt _First, _InIt _Last, _OutIt _Dest, _Scalar_ptr_iterator_tag)
 
template<class _BidIt1 , class _BidIt2 >
_BidIt2 _Move_backward (_BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest)
 
template<class _BidIt1 , class _BidIt2 >
_BidIt2 move_backward (_BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest)
 
template<class _FwdIt , class _Ty >
void _Fill (_FwdIt _First, _FwdIt _Last, const _Ty &_Val)
 
void _Fill (char *_First, char *_Last, char _Val)
 
void _Fill (signed char *_First, signed char *_Last, signed char _Val)
 
void _Fill (unsigned char *_First, unsigned char *_Last, unsigned char _Val)
 
template<class _FwdIt , class _Ty >
void fill (_FwdIt _First, _FwdIt _Last, const _Ty &_Val)
 
template<class _OutIt , class _Diff , class _Ty >
_OutIt _Fill_n (_OutIt _Dest, _Diff _Count, const _Ty &_Val)
 
char * _Fill_n (char *_Dest, size_t _Count, char _Val)
 
signed char * _Fill_n (signed char *_Dest, size_t _Count, signed char _Val)
 
unsigned char * _Fill_n (unsigned char *_Dest, size_t _Count, unsigned char _Val)
 
template<class _OutIt , class _Diff , class _Ty >
_OutIt fill_n (_OutIt _Dest, _Diff _Count, const _Ty &_Val)
 
template<class _InIt1 , class _InIt2 >
bool _Equal (_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2)
 
bool _Equal (const char *_First1, const char *_Last1, const char *_First2)
 
bool _Equal (const signed char *_First1, const signed char *_Last1, const signed char *_First2)
 
bool _Equal (const unsigned char *_First1, const unsigned char *_Last1, const unsigned char *_First2)
 
template<class _InIt1 , class _InIt2 >
bool equal (_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2)
 
template<class _InIt1 , class _InIt2 , class _Pr >
bool _Equal (_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _Pr _Pred)
 
template<class _InIt1 , class _InIt2 , class _Pr >
bool equal (_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _Pr _Pred)
 
template<class _InIt1 , class _InIt2 >
bool _Lexicographical_compare (_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _InIt2 _Last2)
 
bool _Lexicographical_compare (const unsigned char *_First1, const unsigned char *_Last1, const unsigned char *_First2, const unsigned char *_Last2)
 
template<class _InIt1 , class _InIt2 >
bool lexicographical_compare (_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _InIt2 _Last2)
 
template<class _InIt1 , class _InIt2 , class _Pr >
bool _Lexicographical_compare (_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _InIt2 _Last2, _Pr _Pred)
 
template<class _InIt1 , class _InIt2 , class _Pr >
bool lexicographical_compare (_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _InIt2 _Last2, _Pr _Pred)
 
template<class _Ty , class _Ignored >
bool _Within_limits (const _Ty &_Val, true_type, true_type, _Ignored)
 
template<class _Ty >
bool _Within_limits (const _Ty &_Val, true_type, false_type, true_type)
 
template<class _Ty >
bool _Within_limits (const _Ty &_Val, true_type, false_type, false_type)
 
template<class _Ty , class _Ignored >
bool _Within_limits (const _Ty &_Val, false_type, true_type, _Ignored)
 
template<class _Ty , class _Ignored >
bool _Within_limits (const _Ty &_Val, false_type, false_type, _Ignored)
 
template<class _InIt , class _Ty >
bool _Within_limits (_InIt, const _Ty &_Val)
 
template<class _InIt >
bool _Within_limits (_InIt, const bool &)
 
template<class _InIt , class _Ty >
_InIt _Find (_InIt _First, _InIt _Last, const _Ty &_Val, true_type)
 
template<class _InIt , class _Ty >
_InIt _Find (_InIt _First, _InIt _Last, const _Ty &_Val, false_type)
 
template<class _InIt , class _Ty >
_InIt _Find (_InIt _First, _InIt _Last, const _Ty &_Val)
 
template<class _InIt , class _Ty >
_InIt find (_InIt _First, _InIt _Last, const _Ty &_Val)
 
template<class _InIt , class _Ty , class _Pr >
_InIt _Find_pr (_InIt _First, _InIt _Last, const _Ty &_Val, _Pr _Pred)
 
template<class _InIt , class _Ty >
iterator_traits< _InIt >::difference_type _Count_np (_InIt _First, _InIt _Last, const _Ty &_Val)
 
template<class _InIt , class _Ty >
iterator_traits< _InIt >::difference_type count (_InIt _First, _InIt _Last, const _Ty &_Val)
 
template<class _InIt , class _Ty , class _Pr >
iterator_traits< _InIt >::difference_type _Count_pr (_InIt _First, _InIt _Last, const _Ty &_Val, _Pr _Pred)
 
template<class _FwdIt1 , class _FwdIt2 , class _Pr >
bool _Is_permutation (_FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _Pr _Pred)
 
template<class _FwdIt1 , class _FwdIt2 , class _Pr >
bool is_permutation (_FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _Pr _Pred)
 
template<class _FwdIt1 , class _FwdIt2 >
bool is_permutation (_FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2)
 
template<class _BidIt >
void _Reverse (_BidIt _First, _BidIt _Last, bidirectional_iterator_tag)
 
template<class _BidIt >
void reverse (_BidIt _First, _BidIt _Last)
 
template<class _FwdIt >
void _Rotate (_FwdIt _First, _FwdIt _Mid, _FwdIt _Last, forward_iterator_tag)
 
template<class _BidIt >
void _Rotate (_BidIt _First, _BidIt _Mid, _BidIt _Last, bidirectional_iterator_tag)
 
template<class _RanIt , class _Diff , class _Ty >
void _Rotate (_RanIt _First, _RanIt _Mid, _RanIt _Last, _Diff *, _Ty *)
 
template<class _RanIt >
void _Rotate (_RanIt _First, _RanIt _Mid, _RanIt _Last, random_access_iterator_tag)
 
template<class _FwdIt >
_FwdIt rotate (_FwdIt _First, _FwdIt _Mid, _FwdIt _Last)
 
_CRTIMP2_PURE _NO_RETURN (__CLRCALL_PURE_OR_CDECL _Xbad_alloc())
 
_CRTIMP2_PURE _NO_RETURN (__CLRCALL_PURE_OR_CDECL _Xinvalid_argument(_In_z_ const char *))
 

Variables

template<class _Iter >
iterator_traits< _Iter >::value_type * _Val_type (_Iter)
 
template<class _Iter >
iterator_traits< _Iter >::difference_type * _Dist_type (_Iter)
 
const allocator_arg_t allocator_arg = allocator_arg_t()
 

Macro Definition Documentation

#define _DEBUG_ERROR (   mesg)
#define _DEBUG_LT (   x,
 
)    ((x) < (y))
#define _DEBUG_LT_PRED (   pred,
  x,
 
)    pred(x, y)
#define _DEBUG_ORDER (   first,
  last 
)
#define _DEBUG_ORDER_PRED (   first,
  last,
  pred 
)
#define _DEBUG_POINTER (   first)
#define _DEBUG_POINTER2 (   first,
  file,
  line 
)
#define _DEBUG_RANGE (   first,
  last 
)
#define _DEBUG_RANGE2 (   first,
  last,
  file,
  line 
)
#define _UNCHECKED_TYPE (   _Iter)    typename _Get_unchecked_type<_Iter>::type
#define _XUTILITY_

Typedef Documentation

Function Documentation

template<class _InIt , class _Diff >
void _Advance ( _InIt &  _Where,
_Diff  _Off,
input_iterator_tag   
)
inline
653  { // increment iterator by offset, input iterators
654  #if _ITERATOR_DEBUG_LEVEL == 2
655  if (_Off < 0)
656  _DEBUG_ERROR("negative offset in advance");
657  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
658 
659  for (; 0 < _Off; --_Off)
660  ++_Where;
661  }
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
template<class _FwdIt , class _Diff >
void _Advance ( _FwdIt &  _Where,
_Diff  _Off,
forward_iterator_tag   
)
inline
666  { // increment iterator by offset, forward iterators
667  #if _ITERATOR_DEBUG_LEVEL == 2
668  if (_Off < 0)
669  _DEBUG_ERROR("negative offset in advance");
670  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
671 
672  for (; 0 < _Off; --_Off)
673  ++_Where;
674  }
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
template<class _BidIt , class _Diff >
void _Advance ( _BidIt &  _Where,
_Diff  _Off,
bidirectional_iterator_tag   
)
inline
679  { // increment iterator by offset, bidirectional iterators
680  for (; 0 < _Off; --_Off)
681  ++_Where;
682  for (; _Off < 0; ++_Off)
683  --_Where;
684  }
template<class _RanIt , class _Diff >
void _Advance ( _RanIt &  _Where,
_Diff  _Off,
random_access_iterator_tag   
)
inline
689  { // increment iterator by offset, random-access iterators
690  _Where += _Off;
691  }
template<class _BidIt1 , class _BidIt2 >
_BidIt2 _Copy_backward ( _BidIt1  _First,
_BidIt1  _Last,
_BidIt2  _Dest,
_Nonscalar_ptr_iterator_tag   
)
inline
2344  { // copy [_First, _Last) backwards to [..., _Dest), arbitrary iterators
2345  while (_First != _Last)
2346  *--_Dest = *--_Last;
2347  return (_Dest);
2348  }
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _OutIt >
_OutIt _Copy_backward ( _InIt  _First,
_InIt  _Last,
_OutIt  _Dest,
_Scalar_ptr_iterator_tag   
)
inline
2354  { // copy [_First, _Last) backwards to [..., _Dest), pointers to scalars
2355  ptrdiff_t _Count = _Last - _First;
2356  _CSTD memmove(&*_Dest - _Count, &*_First,
2357  _Count * sizeof (*_First));
2358  return (_Dest - _Count);
2359  }
_W64 int ptrdiff_t
Definition: crtdefs.h:530
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:559
_FwdIt _Last
Definition: algorithm:1936
template<class _BidIt1 , class _BidIt2 >
_BidIt2 _Copy_backward ( _BidIt1  _First,
_BidIt1  _Last,
_BidIt2  _Dest 
)
inline
2365  { // copy [_First, _Last) backwards to [..., _Dest), unchecked
2366  return (_Copy_backward(_First, _Last,
2367  _Dest, _Ptr_cat(_First, _Dest)));
2368  }
_BidIt2 _Copy_backward(_BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest, _Nonscalar_ptr_iterator_tag)
Definition: xutility:2342
_Nonscalar_ptr_iterator_tag _Ptr_cat(_Iter1 &, _Iter2 &)
Definition: xutility:413
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _OutIt >
_OutIt _Copy_impl ( _InIt  _First,
_InIt  _Last,
_OutIt  _Dest,
_Nonscalar_ptr_iterator_tag   
)
inline
2043  { // copy [_First, _Last) to [_Dest, ...), arbitrary iterators
2044  for (; _First != _Last; ++_Dest, ++_First)
2045  *_Dest = *_First;
2046  return (_Dest);
2047  }
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _OutIt >
_OutIt _Copy_impl ( _InIt  _First,
_InIt  _Last,
_OutIt  _Dest,
_Scalar_ptr_iterator_tag   
)
inline
2053  { // copy [_First, _Last) to [_Dest, ...), pointers to scalars
2054  ptrdiff_t _Count = _Last - _First;
2055  _CSTD memmove(&*_Dest, &*_First,
2056  _Count * sizeof (*_First));
2057  return (_Dest + _Count);
2058  }
_W64 int ptrdiff_t
Definition: crtdefs.h:530
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:559
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _OutIt >
_OutIt _Copy_impl ( _InIt  _First,
_InIt  _Last,
_OutIt  _Dest 
)
inline
2064  { // copy [_First, _Last) to [_Dest, ...)
2065  return (_Copy_impl(_First, _Last,
2066  _Dest, _Ptr_cat(_First, _Dest)));
2067  }
_OutIt _Copy_impl(_InIt _First, _InIt _Last, _OutIt _Dest, _Nonscalar_ptr_iterator_tag)
Definition: xutility:2041
_Nonscalar_ptr_iterator_tag _Ptr_cat(_Iter1 &, _Iter2 &)
Definition: xutility:413
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _Diff , class _OutIt >
_OutIt _Copy_n ( _InIt  _First,
_Diff  _Count,
_OutIt  _Dest,
input_iterator_tag   
)
inline
2156  { // copy [_First, _First + _Count) to [_Dest, ...), input iterators
2157  *_Dest = *_First; // 0 < _Count has been guaranteed
2158  while (0 < --_Count)
2159  *++_Dest = *++_First;
2160  return (++_Dest);
2161  }
_Diff _Count
Definition: algorithm:1941
template<class _InIt , class _Diff , class _OutIt >
_OutIt _Copy_n ( _InIt  _First,
_Diff  _Count,
_OutIt  _Dest,
forward_iterator_tag   
)
inline
2168  { // copy [_First, _First + _Count) to [_Dest, ...), forward iterators
2169  for (; 0 < _Count; --_Count, ++_Dest, ++_First)
2170  *_Dest = *_First;
2171  return (_Dest);
2172  }
_Diff _Count
Definition: algorithm:1941
template<class _InIt , class _Diff , class _OutIt >
_OutIt _Copy_n ( _InIt  _First,
_Diff  _Count,
_OutIt  _Dest,
_Nonscalar_ptr_iterator_tag   
)
inline
2179  { // copy [_First, _First + _Count) to [_Dest, ...), arbitrary iterators
2180  return (_Copy_n(_First, _Count,
2181  _Dest, _Iter_cat(_First)));
2182  }
iterator_traits< _Iter >::iterator_category _Iter_cat(const _Iter &)
Definition: xutility:404
_Diff _Count
Definition: algorithm:1941
_OutIt _Copy_n(_InIt _First, _Diff _Count, _OutIt _Dest, input_iterator_tag)
Definition: xutility:2154
template<class _InIt , class _Diff , class _OutIt >
_OutIt _Copy_n ( _InIt  _First,
_Diff  _Count,
_OutIt  _Dest,
_Scalar_ptr_iterator_tag   
)
inline
2188  { // copy [_First, _First + _Count) to [_Dest, ...), pointers to scalars
2189  _CSTD memmove(&*_Dest, &*_First,
2190  _Count * sizeof (*_First));
2191  return (_Dest + _Count);
2192  }
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:559
template<class _InIt , class _Diff , class _OutIt >
_OutIt _Copy_n ( _InIt  _First,
_Diff  _Count,
_OutIt  _Dest 
)
inline
2199  { // copy [_First, _First + _Count) to [_Dest, ...), unchecked
2200  return (_Copy_n(_First, _Count,
2201  _Dest, _Ptr_cat(_First, _Dest)));
2202  }
_Nonscalar_ptr_iterator_tag _Ptr_cat(_Iter1 &, _Iter2 &)
Definition: xutility:413
_Diff _Count
Definition: algorithm:1941
_OutIt _Copy_n(_InIt _First, _Diff _Count, _OutIt _Dest, input_iterator_tag)
Definition: xutility:2154
template<class _InIt , class _Ty >
iterator_traits<_InIt>::difference_type _Count_np ( _InIt  _First,
_InIt  _Last,
const _Ty &  _Val 
)
inline
3074  { // count elements that match _Val
3076 
3077  for (; _First != _Last; ++_First)
3078  if (*_First == _Val)
3079  ++_Count;
3080  return (_Count);
3081  }
_Iter::difference_type difference_type
Definition: xutility:373
_Diff _Count
Definition: algorithm:1941
_FwdIt const _Ty _Val
Definition: algorithm:1938
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _Ty , class _Pr >
iterator_traits<_InIt>::difference_type _Count_pr ( _InIt  _First,
_InIt  _Last,
const _Ty &  _Val,
_Pr  _Pred 
)
inline
3098  { // count elements that match _Val, using _Pred
3100 
3101  for (; _First != _Last; ++_First)
3102  if (_Pred(*_First, _Val))
3103  ++_Count;
3104  return (_Count);
3105  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
_Iter::difference_type difference_type
Definition: xutility:373
_Diff _Count
Definition: algorithm:1941
_FwdIt const _Ty _Val
Definition: algorithm:1938
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _Diff >
void _Distance ( _InIt  _First,
_InIt  _Last,
_Diff &  _Off 
)
inline
765  { // add to _Off distance between iterators
766  _Distance2(_First, _Last, _Off, _Iter_cat(_First));
767  }
iterator_traits< _Iter >::iterator_category _Iter_cat(const _Iter &)
Definition: xutility:404
void _Distance2(_InIt _First, _InIt _Last, _Diff &_Off, input_iterator_tag)
Definition: xutility:712
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _Diff >
void _Distance2 ( _InIt  _First,
_InIt  _Last,
_Diff &  _Off,
input_iterator_tag   
)
inline
714  { // add to _Off distance between input iterators
715  for (; _First != _Last; ++_First)
716  ++_Off;
717  }
_FwdIt _Last
Definition: algorithm:1936
template<class _FwdIt , class _Diff >
void _Distance2 ( _FwdIt  _First,
_FwdIt  _Last,
_Diff &  _Off,
forward_iterator_tag   
)
inline
723  { // add to _Off distance between forward iterators (redundant)
724  for (; _First != _Last; ++_First)
725  ++_Off;
726  }
_FwdIt _Last
Definition: algorithm:1936
template<class _BidIt , class _Diff >
void _Distance2 ( _BidIt  _First,
_BidIt  _Last,
_Diff &  _Off,
bidirectional_iterator_tag   
)
inline
732  { // add to _Off distance between bidirectional iterators (redundant)
733  for (; _First != _Last; ++_First)
734  ++_Off;
735  }
_FwdIt _Last
Definition: algorithm:1936
template<class _RanIt , class _Diff >
void _Distance2 ( _RanIt  _First,
_RanIt  _Last,
_Diff &  _Off,
random_access_iterator_tag   
)
inline
741  { // add to _Off distance between random-access iterators
742  #if _ITERATOR_DEBUG_LEVEL == 2
743  if (_First != _Last)
744  { // check for null pointers
745  _DEBUG_POINTER(_First);
747  }
748  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
749 
750  _Off += _Last - _First;
751  }
#define _DEBUG_POINTER(first)
Definition: xutility:465
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt1 , class _InIt2 >
bool _Equal ( _InIt1  _First1,
_InIt1  _Last1,
_InIt2  _First2 
)
inline
2735  { // compare [_First1, _Last1) to [_First2, ...)
2736  for (; _First1 != _Last1; ++_First1, ++_First2)
2737  if (!(*_First1 == *_First2))
2738  return (false);
2739  return (true);
2740  }
bool _Equal ( const char *  _First1,
const char *  _Last1,
const char *  _First2 
)
inline
2744  { // compare [_First1, _Last1) to [_First2, ...), for chars
2745  return (_CSTD memcmp(_First1, _First2, _Last1 - _First1) == 0);
2746  }
#define _CSTD
Definition: yvals.h:559
_Check_return_ int __cdecl memcmp(_In_reads_bytes_(_Size) const void *_Buf1, _In_reads_bytes_(_Size) const void *_Buf2, _In_ size_t _Size)
bool _Equal ( const signed char *  _First1,
const signed char *  _Last1,
const signed char *  _First2 
)
inline
2750  { // compare [_First1, _Last1) to [_First2, ...), for signed chars
2751  return (_CSTD memcmp(_First1, _First2, _Last1 - _First1) == 0);
2752  }
#define _CSTD
Definition: yvals.h:559
_Check_return_ int __cdecl memcmp(_In_reads_bytes_(_Size) const void *_Buf1, _In_reads_bytes_(_Size) const void *_Buf2, _In_ size_t _Size)
bool _Equal ( const unsigned char *  _First1,
const unsigned char *  _Last1,
const unsigned char *  _First2 
)
inline
2756  { // compare [_First1, _Last1) to [_First2, ...), for unsigned chars
2757  return (_CSTD memcmp(_First1, _First2, _Last1 - _First1) == 0);
2758  }
#define _CSTD
Definition: yvals.h:559
_Check_return_ int __cdecl memcmp(_In_reads_bytes_(_Size) const void *_Buf1, _In_reads_bytes_(_Size) const void *_Buf2, _In_ size_t _Size)
template<class _InIt1 , class _InIt2 , class _Pr >
bool _Equal ( _InIt1  _First1,
_InIt1  _Last1,
_InIt2  _First2,
_Pr  _Pred 
)
inline
2820  { // compare [_First1, _Last1) to [_First2, ...) using _Pred
2821  for (; _First1 != _Last1; ++_First1, ++_First2)
2822  if (!_Pred(*_First1, *_First2))
2823  return (false);
2824  return (true);
2825  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
template<class _FwdIt , class _Ty >
void _Fill ( _FwdIt  _First,
_FwdIt  _Last,
const _Ty &  _Val 
)
inline
2598  { // copy _Val through [_First, _Last)
2599  for (; _First != _Last; ++_First)
2600  *_First = _Val;
2601  }
_FwdIt const _Ty _Val
Definition: algorithm:1938
_FwdIt _Last
Definition: algorithm:1936
void _Fill ( char *  _First,
char *  _Last,
char  _Val 
)
inline
2604  { // copy char _Val through [_First, _Last)
2605  _CSTD memset(_First, _Val, _Last - _First);
2606  }
#define _CSTD
Definition: yvals.h:559
_FwdIt const _Ty _Val
Definition: algorithm:1938
_FwdIt _Last
Definition: algorithm:1936
void _Fill ( signed char *  _First,
signed char *  _Last,
signed char  _Val 
)
inline
2609  { // copy signed char _Val through [_First, _Last)
2610  _CSTD memset(_First, _Val, _Last - _First);
2611  }
#define _CSTD
Definition: yvals.h:559
_FwdIt const _Ty _Val
Definition: algorithm:1938
_FwdIt _Last
Definition: algorithm:1936
void _Fill ( unsigned char *  _First,
unsigned char *  _Last,
unsigned char  _Val 
)
inline
2614  { // copy unsigned char _Val through [_First, _Last)
2615  _CSTD memset(_First, _Val, _Last - _First);
2616  }
#define _CSTD
Definition: yvals.h:559
_FwdIt const _Ty _Val
Definition: algorithm:1938
_FwdIt _Last
Definition: algorithm:1936
template<class _OutIt , class _Diff , class _Ty >
_OutIt _Fill_n ( _OutIt  _Dest,
_Diff  _Count,
const _Ty &  _Val 
)
inline
2631  { // copy _Val _Count times through [_Dest, ...)
2632  for (; 0 < _Count; --_Count, ++_Dest)
2633  *_Dest = _Val;
2634  return (_Dest);
2635  }
_Diff _Count
Definition: algorithm:1941
_FwdIt const _Ty _Val
Definition: algorithm:1938
char* _Fill_n ( char *  _Dest,
size_t  _Count,
char  _Val 
)
inline
2638  { // copy char _Val _Count times through [_Dest, ...)
2639  _CSTD memset(_Dest, _Val, _Count);
2640  return (_Dest + _Count);
2641  }
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:559
_FwdIt const _Ty _Val
Definition: algorithm:1938
signed char* _Fill_n ( signed char *  _Dest,
size_t  _Count,
signed char  _Val 
)
inline
2645  { // copy signed char _Val _Count times through [_Dest, ...)
2646  _CSTD memset(_Dest, _Val, _Count);
2647  return (_Dest + _Count);
2648  }
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:559
_FwdIt const _Ty _Val
Definition: algorithm:1938
unsigned char* _Fill_n ( unsigned char *  _Dest,
size_t  _Count,
unsigned char  _Val 
)
inline
2652  { // copy unsigned char _Val _Count times through [_Dest, ...)
2653  _CSTD memset(_Dest, _Val, _Count);
2654  return (_Dest + _Count);
2655  }
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:559
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _InIt , class _Ty >
_InIt _Find ( _InIt  _First,
_InIt  _Last,
const _Ty &  _Val,
true_type   
)
inline
3013  { // find first byte matching integral _Val
3014  if (!_Within_limits(_First, _Val))
3015  return (_Last);
3016  _First = static_cast<_InIt>(_CSTD memchr(
3017  _First, static_cast<unsigned char>(_Val), _Last - _First));
3018  return (_First ? _First : _Last);
3019  }
_Check_return_ _CRTIMP _CONST_RETURN void *__cdecl memchr(_In_reads_bytes_opt_(_MaxCount) const void *_Buf, _In_ int _Val, _In_ size_t _MaxCount)
bool _Within_limits(const _Ty &_Val, true_type, true_type, _Ignored)
Definition: xutility:2964
#define _CSTD
Definition: yvals.h:559
_FwdIt const _Ty _Val
Definition: algorithm:1938
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _Ty >
_InIt _Find ( _InIt  _First,
_InIt  _Last,
const _Ty &  _Val,
false_type   
)
inline
3024  { // find first matching _Val
3025  for (; _First != _Last; ++_First)
3026  if (*_First == _Val)
3027  break;
3028  return (_First);
3029  }
_FwdIt const _Ty _Val
Definition: algorithm:1938
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _Ty >
_InIt _Find ( _InIt  _First,
_InIt  _Last,
const _Ty &  _Val 
)
inline
3034  { // find first matching _Val
3035  // activate optimization for pointers to (const) bytes and integral values
3036  typedef integral_constant<bool,
3044  > _Memchr_opt;
3045  return (_Find(_First, _Last, _Val, _Memchr_opt()));
3046  }
Definition: xtr1common:34
#define bool
Definition: stdbool.h:10
_InIt _Find(_InIt _First, _InIt _Last, const _Ty &_Val, true_type)
Definition: xutility:3012
Definition: xtr1common:268
Definition: xtr1common:94
_FwdIt const _Ty _Val
Definition: algorithm:1938
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _Ty , class _Pr >
_InIt _Find_pr ( _InIt  _First,
_InIt  _Last,
const _Ty &  _Val,
_Pr  _Pred 
)
inline
3062  { // find first matching _Val, using _Pred
3063  for (; _First != _Last; ++_First)
3064  if (_Pred(*_First, _Val))
3065  break;
3066  return (_First);
3067  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
_FwdIt const _Ty _Val
Definition: algorithm:1938
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty >
struct _Get_unchecked_type _GET_TYPE_OR_DEFAULT ( _Unchecked_type  ,
_Ty   
)
template<class _Ty >
struct _Is_checked_helper _HAS_ONE_TYPE ( _Unchecked_type  )
template<class _Iter >
_Is_checked_helper<_Iter>::type _Is_checked ( _Iter  )
inline
273  { // return type is derived from true_type if iterator is checked
274  return (typename _Is_checked_helper<_Iter>::type());
275  }
template<class _FwdIt1 , class _FwdIt2 , class _Pr >
bool _Is_permutation ( _FwdIt1  _First1,
_FwdIt1  _Last1,
_FwdIt2  _First2,
_Pr  _Pred 
)
inline
3113  { // test if [_First1, _Last1) == permuted [_First2, ...), using _Pred
3114  for (; _First1 != _Last1; ++_First1, ++_First2)
3115  if (!_Pred(*_First1, *_First2))
3116  break; // find first inequality
3117  if (_First1 != _Last1)
3118  { // check match counts in suffix
3119  _FwdIt2 _Last2 = _First2;
3120  advance(_Last2, distance(_First1, _Last1));
3121  for (_FwdIt1 _Next1 = _First1; _Next1 != _Last1; ++_Next1)
3122  if (_Next1 == _Find_pr(_First1, _Next1, *_Next1, _Pred))
3123  { // new value, compare match counts
3125  _Count_pr(_First2, _Last2, *_Next1, _Pred);
3126  if (_Count == 0
3127  || _Count != _Count_pr(_Next1, _Last1, *_Next1, _Pred))
3128  return (false); // match counts differ, fail
3129  }
3130  }
3131  return (true);
3132  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
iterator_traits< _InIt >::difference_type _Count_pr(_InIt _First, _InIt _Last, const _Ty &_Val, _Pr _Pred)
Definition: xutility:3097
_InIt _Find_pr(_InIt _First, _InIt _Last, const _Ty &_Val, _Pr _Pred)
Definition: xutility:3061
iterator_traits< _InIt >::difference_type distance(_InIt _First, _InIt _Last)
Definition: xutility:755
_Iter::difference_type difference_type
Definition: xutility:373
void advance(_InIt &_Where, _Diff _Off)
Definition: xutility:695
_Diff _Count
Definition: algorithm:1941
template<class _Iter >
iterator_traits<_Iter>::iterator_category _Iter_cat ( const _Iter &  )
inline
405  { // return category from iterator argument
407  return (_Cat);
408  }
_Iter::iterator_category iterator_category
Definition: xutility:371
template<class _InIt1 , class _InIt2 >
bool _Lexicographical_compare ( _InIt1  _First1,
_InIt1  _Last1,
_InIt2  _First2,
_InIt2  _Last2 
)
inline
2891  { // order [_First1, _Last1) vs. [_First2, _Last2)
2892  for (; _First1 != _Last1 && _First2 != _Last2; ++_First1, ++_First2)
2893  if (_DEBUG_LT(*_First1, *_First2))
2894  return (true);
2895  else if (*_First2 < *_First1)
2896  return (false);
2897  return (_First1 == _Last1 && _First2 != _Last2);
2898  }
#define _DEBUG_LT(x, y)
Definition: xutility:461
bool _Lexicographical_compare ( const unsigned char *  _First1,
const unsigned char *  _Last1,
const unsigned char *  _First2,
const unsigned char *  _Last2 
)
inline
2903  { // order [_First1, _Last1) vs. [_First2, _Last2), for unsigned char
2904  ptrdiff_t _Num1 = _Last1 - _First1;
2905  ptrdiff_t _Num2 = _Last2 - _First2;
2906  int _Ans = _CSTD memcmp(_First1, _First2, _Num1 < _Num2 ? _Num1 : _Num2);
2907  return (_Ans < 0 || (_Ans == 0 && _Num1 < _Num2));
2908  }
_W64 int ptrdiff_t
Definition: crtdefs.h:530
#define _CSTD
Definition: yvals.h:559
_Check_return_ int __cdecl memcmp(_In_reads_bytes_(_Size) const void *_Buf1, _In_reads_bytes_(_Size) const void *_Buf2, _In_ size_t _Size)
template<class _InIt1 , class _InIt2 , class _Pr >
bool _Lexicographical_compare ( _InIt1  _First1,
_InIt1  _Last1,
_InIt2  _First2,
_InIt2  _Last2,
_Pr  _Pred 
)
inline
2939  { // order [_First1, _Last1) vs. [_First2, _Last2) using _Pred
2940  for (; _First1 != _Last1 && _First2 != _Last2; ++_First1, ++_First2)
2941  if (_DEBUG_LT_PRED(_Pred, *_First1, *_First2))
2942  return (true);
2943  else if (_Pred(*_First2, *_First1))
2944  return (false);
2945  return (_First1 == _Last1 && _First2 != _Last2);
2946  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
#define _DEBUG_LT_PRED(pred, x, y)
Definition: xutility:462
template<class _InIt , class _OutIt >
_OutIt _Move ( _InIt  _First,
_InIt  _Last,
_OutIt  _Dest,
_Nonscalar_ptr_iterator_tag   
)
inline
2418  { // move [_First, _Last) to [_Dest, ...), arbitrary iterators
2419  for (; _First != _Last; ++_Dest, ++_First)
2420  *_Dest = _STD move(*_First);
2421  return (_Dest);
2422  }
_OutIt move(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2447
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _OutIt >
_OutIt _Move ( _InIt  _First,
_InIt  _Last,
_OutIt  _Dest,
_Scalar_ptr_iterator_tag   
)
inline
2428  { // move [_First, _Last) to [_Dest, ...), pointers to scalars
2429  ptrdiff_t _Count = _Last - _First;
2430  _CSTD memmove(&*_Dest, &*_First,
2431  _Count * sizeof (*_First));
2432  return (_Dest + _Count);
2433  }
_W64 int ptrdiff_t
Definition: crtdefs.h:530
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:559
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _OutIt >
_OutIt _Move ( _InIt  _First,
_InIt  _Last,
_OutIt  _Dest 
)
inline
2439  { // move [_First, _Last) to [_Dest, ...), unchecked
2440  return (_Move(_First, _Last,
2441  _Dest, _Ptr_cat(_First, _Dest)));
2442  }
_OutIt _Move(_InIt _First, _InIt _Last, _OutIt _Dest, _Nonscalar_ptr_iterator_tag)
Definition: xutility:2416
_Nonscalar_ptr_iterator_tag _Ptr_cat(_Iter1 &, _Iter2 &)
Definition: xutility:413
_FwdIt _Last
Definition: algorithm:1936
template<class _BidIt1 , class _BidIt2 >
_BidIt2 _Move_backward ( _BidIt1  _First,
_BidIt1  _Last,
_BidIt2  _Dest,
_Nonscalar_ptr_iterator_tag   
)
inline
2525  { // move [_First, _Last) backwards to [..., _Dest), arbitrary iterators
2526  while (_First != _Last)
2527  *--_Dest = _STD move(*--_Last);
2528  return (_Dest);
2529  }
_OutIt move(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2447
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _OutIt >
_OutIt _Move_backward ( _InIt  _First,
_InIt  _Last,
_OutIt  _Dest,
_Scalar_ptr_iterator_tag   
)
inline
2535  { // move [_First, _Last) backwards to [..., _Dest), pointers to scalars
2536  ptrdiff_t _Count = _Last - _First;
2537  _CSTD memmove(&*_Dest - _Count, &*_First,
2538  _Count * sizeof (*_First));
2539  return (_Dest - _Count);
2540  }
_W64 int ptrdiff_t
Definition: crtdefs.h:530
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:559
_FwdIt _Last
Definition: algorithm:1936
template<class _BidIt1 , class _BidIt2 >
_BidIt2 _Move_backward ( _BidIt1  _First,
_BidIt1  _Last,
_BidIt2  _Dest 
)
inline
2546  { // move [_First, _Last) backwards to [..., _Dest), unchecked
2547  return (_Move_backward(_First, _Last,
2548  _Dest, _Ptr_cat(_First, _Dest)));
2549  }
_BidIt2 _Move_backward(_BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest, _Nonscalar_ptr_iterator_tag)
Definition: xutility:2523
_Nonscalar_ptr_iterator_tag _Ptr_cat(_Iter1 &, _Iter2 &)
Definition: xutility:413
_FwdIt _Last
Definition: algorithm:1936
_CRTIMP2_PURE _NO_RETURN ( __CLRCALL_PURE_OR_CDECL   _Xbad_alloc())
_CRTIMP2_PURE _NO_RETURN ( __CLRCALL_PURE_OR_CDECL   _Xinvalid_argument_In_z_ const char *)
template<class _Iter1 , class _Iter2 >
_Nonscalar_ptr_iterator_tag _Ptr_cat ( _Iter1 &  ,
_Iter2 &   
)
inline
414  { // return pointer category from arbitrary arguments
416  return (_Cat);
417  }
Definition: xutility:324
template<class _Elem1 , class _Elem2 >
_Ptr_cat_helper<_Elem1, _Elem2>::type _Ptr_cat ( _Elem1 *  ,
_Elem2 *   
)
inline
444  { // return pointer category from pointers
446  return (_Cat);
447  }
Definition: xutility:324
template<class _Elem1 , class _Elem2 >
_Ptr_cat_helper<_Elem1, _Elem2>::type _Ptr_cat ( const _Elem1 *  ,
_Elem2 *   
)
inline
453  { // return pointer category from pointers
455  return (_Cat);
456  }
Definition: xutility:324
template<class _Iter , class _UIter >
_Iter& _Rechecked ( _Iter &  _Dest,
_UIter  _Src 
)
inline
288  { // reset checked from unchecked, generic
289  _Dest = _Src;
290  return (_Dest);
291  }
_In_ size_t _In_z_ const unsigned char * _Src
Definition: mbstring.h:95
template<class _Ty , size_t _Size>
_Array_const_iterator<_Ty, _Size>& _Rechecked ( _Array_const_iterator< _Ty, _Size > &  _Iter,
typename _Array_const_iterator< _Ty, _Size >::_Unchecked_type  _Right 
)
inline
1670  { // convert to checked
1671  return (_Iter._Rechecked(_Right));
1672  }
_Myiter & _Rechecked(_Unchecked_type _Right)
Definition: xutility:1340
const _Ty & _Right
Definition: algorithm:4087
template<class _Ty , size_t _Size>
_Array_iterator<_Ty, _Size>& _Rechecked ( _Array_iterator< _Ty, _Size > &  _Iter,
typename _Array_iterator< _Ty, _Size >::_Unchecked_type  _Right 
)
inline
1809  { // convert to checked
1810  return (_Iter._Rechecked(_Right));
1811  }
_Myiter & _Rechecked(_Unchecked_type _Right)
Definition: xutility:1714
const _Ty & _Right
Definition: algorithm:4087
template<class _BidIt >
void _Reverse ( _BidIt  _First,
_BidIt  _Last,
bidirectional_iterator_tag   
)
inline
3159  { // reverse elements in [_First, _Last), bidirectional iterators
3160  for (; _First != _Last && _First != --_Last; ++_First)
3161  _STD iter_swap(_First, _Last);
3162  }
_STD_BEGIN void swap(_Ty &, _Ty &) _NOEXCEPT_OP(is_nothrow_move_constructible< _Ty > void iter_swap(_FwdIt1 _Left, _FwdIt2 _Right)
Definition: utility:26
_FwdIt _Last
Definition: algorithm:1936
template<class _FwdIt >
void _Rotate ( _FwdIt  _First,
_FwdIt  _Mid,
_FwdIt  _Last,
forward_iterator_tag   
)
inline
3175  { // rotate [_First, _Last), forward iterators
3176  for (_FwdIt _Next = _Mid; ; )
3177  { // swap [_First, ...) into place
3178  _STD iter_swap(_First, _Next);
3179  if (++_First == _Mid)
3180  if (++_Next == _Last)
3181  break; // done, quit
3182  else
3183  _Mid = _Next; // mark end of next interval
3184  else if (++_Next == _Last)
3185  _Next = _Mid; // wrap to last end
3186  }
3187  }
_STD_BEGIN void swap(_Ty &, _Ty &) _NOEXCEPT_OP(is_nothrow_move_constructible< _Ty > void iter_swap(_FwdIt1 _Left, _FwdIt2 _Right)
Definition: utility:26
_FwdIt _Last
Definition: algorithm:1936
template<class _BidIt >
void _Rotate ( _BidIt  _First,
_BidIt  _Mid,
_BidIt  _Last,
bidirectional_iterator_tag   
)
inline
3192  { // rotate [_First, _Last), bidirectional iterators
3193  _STD reverse(_First, _Mid);
3194  _STD reverse(_Mid, _Last);
3195  _STD reverse(_First, _Last);
3196  }
void reverse(_BidIt _First, _BidIt _Last)
Definition: xutility:3165
_FwdIt _Last
Definition: algorithm:1936
template<class _RanIt , class _Diff , class _Ty >
void _Rotate ( _RanIt  _First,
_RanIt  _Mid,
_RanIt  _Last,
_Diff *  ,
_Ty *   
)
inline
3202  { // rotate [_First, _Last), random-access iterators
3203  _Diff _Shift = _Mid - _First;
3204  _Diff _Count = _Last - _First;
3205 
3206  for (_Diff _Factor = _Shift; _Factor != 0; )
3207  { // find subcycle count as GCD of shift count and length
3208  _Diff _Tmp = _Count % _Factor;
3209  _Count = _Factor;
3210  _Factor = _Tmp;
3211  }
3212 
3213  if (_Count < _Last - _First)
3214  for (; 0 < _Count; --_Count)
3215  { // rotate each subcycle
3216  _RanIt _Hole = _First + _Count;
3217  _RanIt _Next = _Hole;
3218  _RanIt _Next1 = _Next + _Shift == _Last ? _First : _Next + _Shift;
3219  for (; ; )
3220  { // percolate elements back around subcycle
3221  iter_swap(_Next, _Next1);
3222  _Next = _Next1;
3223  _Next1 = _Shift < _Last - _Next1 ? _Next1 + _Shift
3224  : _First + (_Shift - (_Last - _Next1));
3225  if (_Next1 == _Hole)
3226  break;
3227  }
3228  }
3229  }
_STD_BEGIN void swap(_Ty &, _Ty &) _NOEXCEPT_OP(is_nothrow_move_constructible< _Ty > void iter_swap(_FwdIt1 _Left, _FwdIt2 _Right)
Definition: utility:26
_Diff _Count
Definition: algorithm:1941
_FwdIt _Last
Definition: algorithm:1936
template<class _RanIt >
void _Rotate ( _RanIt  _First,
_RanIt  _Mid,
_RanIt  _Last,
random_access_iterator_tag   
)
inline
3234  { // rotate [_First, _Last), random-access iterators
3235  _Rotate(_First, _Mid, _Last, _Dist_type(_First), _Val_type(_First));
3236  }
iterator_traits< _Iter >::value_type * _Val_type(_Iter)
Definition: xutility:644
void _Rotate(_FwdIt _First, _FwdIt _Mid, _FwdIt _Last, forward_iterator_tag)
Definition: xutility:3173
iterator_traits< _Iter >::difference_type * _Dist_type(_Iter)
Definition: xutility:704
_FwdIt _Last
Definition: algorithm:1936
template<class _Iter >
_Iter _Unchecked ( _Iter  _Src)
inline
280  { // construct unchecked from checked, generic
281  return (_Src);
282  }
_In_ size_t _In_z_ const unsigned char * _Src
Definition: mbstring.h:95
template<class _Ty , size_t _Size>
_Array_const_iterator<_Ty, _Size>::_Unchecked_type _Unchecked ( _Array_const_iterator< _Ty, _Size _Iter)
inline
1660  { // convert to unchecked
1661  return (_Iter._Unchecked());
1662  }
_Unchecked_type _Unchecked() const
Definition: xutility:1346
template<class _Ty , size_t _Size>
_Array_iterator<_Ty, _Size>::_Unchecked_type _Unchecked ( _Array_iterator< _Ty, _Size _Iter)
inline
1799  { // convert to unchecked
1800  return (_Iter._Unchecked());
1801  }
_Unchecked_type _Unchecked() const
Definition: xutility:1720
template<class _Ty , class _Ignored >
bool _Within_limits ( const _Ty &  _Val,
true_type  ,
true_type  ,
_Ignored   
)
inline
2965  { // signed _Elem, signed _Ty
2966  return (SCHAR_MIN <= _Val && _Val <= SCHAR_MAX);
2967  }
#define SCHAR_MIN
Definition: limits.h:23
#define SCHAR_MAX
Definition: limits.h:24
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty >
bool _Within_limits ( const _Ty &  _Val,
true_type  ,
false_type  ,
true_type   
)
inline
2971  { // signed _Elem, unsigned _Ty, -1 == static_cast<_Ty>(-1)
2972  return (_Val <= SCHAR_MAX || static_cast<_Ty>(SCHAR_MIN) <= _Val);
2973  }
#define SCHAR_MIN
Definition: limits.h:23
#define SCHAR_MAX
Definition: limits.h:24
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty >
bool _Within_limits ( const _Ty &  _Val,
true_type  ,
false_type  ,
false_type   
)
inline
2977  { // signed _Elem, unsigned _Ty, -1 != static_cast<_Ty>(-1)
2978  return (_Val <= SCHAR_MAX);
2979  }
#define SCHAR_MAX
Definition: limits.h:24
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty , class _Ignored >
bool _Within_limits ( const _Ty &  _Val,
false_type  ,
true_type  ,
_Ignored   
)
inline
2984  { // unsigned _Elem, signed _Ty
2985  return (0 <= _Val && _Val <= UCHAR_MAX);
2986  }
_FwdIt const _Ty _Val
Definition: algorithm:1938
#define UCHAR_MAX
Definition: limits.h:25
template<class _Ty , class _Ignored >
bool _Within_limits ( const _Ty &  _Val,
false_type  ,
false_type  ,
_Ignored   
)
inline
2991  { // unsigned _Elem, unsigned _Ty
2992  return (_Val <= UCHAR_MAX);
2993  }
_FwdIt const _Ty _Val
Definition: algorithm:1938
#define UCHAR_MAX
Definition: limits.h:25
template<class _InIt , class _Ty >
bool _Within_limits ( _InIt  ,
const _Ty &  _Val 
)
inline
2998  { // check whether _Val is within the limits of _Elem
2999  typedef typename remove_pointer<_InIt>::type _Elem;
3000  return (_Within_limits(_Val, is_signed<_Elem>(), is_signed<_Ty>(),
3001  integral_constant<bool, -1 == static_cast<_Ty>(-1)>()));
3002  }
Definition: xtr1common:34
_Ty type
Definition: type_traits:266
bool _Within_limits(const _Ty &_Val, true_type, true_type, _Ignored)
Definition: xutility:2964
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _InIt >
bool _Within_limits ( _InIt  ,
const bool  
)
inline
3006  { // bools are always within the limits of _Elem
3007  return (true);
3008  }
template<class _InIt , class _Diff >
void advance ( _InIt &  _Where,
_Diff  _Off 
)
inline
696  { // increment iterator by offset, arbitrary iterators
697  _Advance(_Where, _Off, _Iter_cat(_Where));
698  }
iterator_traits< _Iter >::iterator_category _Iter_cat(const _Iter &)
Definition: xutility:404
void _Advance(_InIt &_Where, _Diff _Off, input_iterator_tag)
Definition: xutility:652
template<class _Container >
auto begin ( _Container &  _Cont) -> decltype(_Cont.begin())
inline
1189  { // get beginning of sequence
1190  return (_Cont.begin());
1191  }
template<class _Container >
auto begin ( const _Container &  _Cont) -> decltype(_Cont.begin())
inline
1195  { // get beginning of sequence
1196  return (_Cont.begin());
1197  }
template<class _Ty , size_t _Size>
_Ty* begin ( _Ty(&)  _Array[_Size])
inline
1214  { // get beginning of array
1215  return (_Array);
1216  }
template<class _Container >
auto cbegin ( const _Container &  _Cont) -> decltype(_STD begin(_Cont))
inline
1228  { // get beginning of sequence
1229  return (_STD begin(_Cont));
1230  }
auto begin(_Container &_Cont) -> decltype(_Cont.begin())
Definition: xutility:1188
template<class _Container >
auto cend ( const _Container &  _Cont) -> decltype(_STD end(_Cont))
inline
1234  { // get end of sequence
1235  return (_STD end(_Cont));
1236  }
auto end(_Container &_Cont) -> decltype(_Cont.end())
Definition: xutility:1200
template<class _InIt , class _OutIt >
_OutIt copy ( _InIt  _First,
_InIt  _Last,
_OutIt  _Dest 
)
inline
2074  { // copy [_First, _Last) to [_Dest, ...)
2075  return (_Rechecked(_Dest,
2077  _Unchecked(_Dest))));
2078  }
_OutIt _Copy_impl(_InIt _First, _InIt _Last, _OutIt _Dest, _Nonscalar_ptr_iterator_tag)
Definition: xutility:2041
_Iter & _Rechecked(_Iter &_Dest, _UIter _Src)
Definition: xutility:287
_Iter _Unchecked(_Iter _Src)
Definition: xutility:279
_FwdIt _Last
Definition: algorithm:1936
template<class _BidIt1 , class _BidIt2 >
_BidIt2 copy_backward ( _BidIt1  _First,
_BidIt1  _Last,
_BidIt2  _Dest 
)
inline
2375  { // copy [_First, _Last) backwards to [..., _Dest)
2376  return (_Rechecked(_Dest,
2378  _Unchecked(_Dest))));
2379  }
_Iter & _Rechecked(_Iter &_Dest, _UIter _Src)
Definition: xutility:287
_BidIt2 _Copy_backward(_BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest, _Nonscalar_ptr_iterator_tag)
Definition: xutility:2342
_Iter _Unchecked(_Iter _Src)
Definition: xutility:279
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _Diff , class _OutIt >
_OutIt copy_n ( _InIt  _First,
_Diff  _Count,
_OutIt  _Dest 
)
inline
2210  { // copy [_First, _First + _Count) to [_Dest, ...)
2211  if (_Count <= 0)
2212  return (_Dest);
2213  else
2214  return (_Rechecked(_Dest,
2215  _Copy_n(_Unchecked(_First), _Count,
2216  _Unchecked(_Dest))));
2217  }
_Iter & _Rechecked(_Iter &_Dest, _UIter _Src)
Definition: xutility:287
_Iter _Unchecked(_Iter _Src)
Definition: xutility:279
_Diff _Count
Definition: algorithm:1941
_OutIt _Copy_n(_InIt _First, _Diff _Count, _OutIt _Dest, input_iterator_tag)
Definition: xutility:2154
template<class _InIt , class _Ty >
iterator_traits<_InIt>::difference_type count ( _InIt  _First,
_InIt  _Last,
const _Ty &  _Val 
)
inline
3087  { // count elements that match _Val
3088  _DEBUG_RANGE(_First, _Last);
3089  return (_Count_np(_Unchecked(_First), _Unchecked(_Last), _Val));
3090  }
iterator_traits< _InIt >::difference_type _Count_np(_InIt _First, _InIt _Last, const _Ty &_Val)
Definition: xutility:3073
#define _DEBUG_RANGE(first, last)
Definition: xutility:467
_Iter _Unchecked(_Iter _Src)
Definition: xutility:279
_FwdIt const _Ty _Val
Definition: algorithm:1938
_FwdIt _Last
Definition: algorithm:1936
template<class _Container >
auto crbegin ( const _Container &  _Cont) -> decltype(_STD rbegin(_Cont))
inline
1292  { // get beginning of reversed sequence
1293  return (_STD rbegin(_Cont));
1294  }
auto rbegin(_Container &_Cont) -> decltype(_Cont.rbegin())
Definition: xutility:1240
template<class _Container >
auto crend ( const _Container &  _Cont) -> decltype(_STD rend(_Cont))
inline
1298  { // get end of reversed sequence
1299  return (_STD rend(_Cont));
1300  }
auto rend(_Container &_Cont) -> decltype(_Cont.rend())
Definition: xutility:1252
template<class _InIt >
iterator_traits<_InIt>::difference_type distance ( _InIt  _First,
_InIt  _Last 
)
inline
756  { // return distance between iterators
757  typename iterator_traits<_InIt>::difference_type _Off = 0;
758  _Distance2(_First, _Last, _Off, _Iter_cat(_First));
759  return (_Off);
760  }
_Iter::difference_type difference_type
Definition: xutility:373
iterator_traits< _Iter >::iterator_category _Iter_cat(const _Iter &)
Definition: xutility:404
void _Distance2(_InIt _First, _InIt _Last, _Diff &_Off, input_iterator_tag)
Definition: xutility:712
_FwdIt _Last
Definition: algorithm:1936
template<class _Container >
auto end ( _Container &  _Cont) -> decltype(_Cont.end())
inline
1201  { // get end of sequence
1202  return (_Cont.end());
1203  }
template<class _Container >
auto end ( const _Container &  _Cont) -> decltype(_Cont.end())
inline
1207  { // get end of sequence
1208  return (_Cont.end());
1209  }
template<class _Ty , size_t _Size>
_Ty* end ( _Ty(&)  _Array[_Size])
inline
1221  { // get end of array
1222  return (_Array + _Size);
1223  }
_Check_return_ _In_ long _Size
Definition: io.h:325
template<class _InIt1 , class _InIt2 >
bool equal ( _InIt1  _First1,
_InIt1  _Last1,
_InIt2  _First2 
)
inline
2765  { // compare [_First1, _Last1) to [_First2, ...)
2766  return (_Equal(_Unchecked(_First1), _Unchecked(_Last1),
2767  _Unchecked(_First2)));
2768  }
_Iter _Unchecked(_Iter _Src)
Definition: xutility:279
bool _Equal(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2)
Definition: xutility:2734
template<class _InIt1 , class _InIt2 , class _Pr >
bool equal ( _InIt1  _First1,
_InIt1  _Last1,
_InIt2  _First2,
_Pr  _Pred 
)
inline
2833  { // compare [_First1, _Last1) to [_First2, ...)
2834  return (_Equal(_Unchecked(_First1), _Unchecked(_Last1),
2835  _Unchecked(_First2), _Pred));
2836  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
_Iter _Unchecked(_Iter _Src)
Definition: xutility:279
bool _Equal(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2)
Definition: xutility:2734
template<class _FwdIt , class _Ty >
void fill ( _FwdIt  _First,
_FwdIt  _Last,
const _Ty &  _Val 
)
inline
2621  { // copy _Val through [_First, _Last)
2622  _DEBUG_RANGE(_First, _Last);
2623  _Fill(_Unchecked(_First), _Unchecked(_Last), _Val);
2624  }
#define _DEBUG_RANGE(first, last)
Definition: xutility:467
_Iter _Unchecked(_Iter _Src)
Definition: xutility:279
_FwdIt const _Ty _Val
Definition: algorithm:1938
_FwdIt _Last
Definition: algorithm:1936
void _Fill(_FwdIt _First, _FwdIt _Last, const _Ty &_Val)
Definition: xutility:2597
template<class _OutIt , class _Diff , class _Ty >
_OutIt fill_n ( _OutIt  _Dest,
_Diff  _Count,
const _Ty &  _Val 
)
inline
2662  { // copy _Val _Count times through [_Dest, ...)
2663  return (_Rechecked(_Dest, _Fill_n(_Unchecked(_Dest), _Count, _Val)));
2664  }
_Iter & _Rechecked(_Iter &_Dest, _UIter _Src)
Definition: xutility:287
_Iter _Unchecked(_Iter _Src)
Definition: xutility:279
_OutIt _Fill_n(_OutIt _Dest, _Diff _Count, const _Ty &_Val)
Definition: xutility:2630
_Diff _Count
Definition: algorithm:1941
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _InIt , class _Ty >
_InIt find ( _InIt  _First,
_InIt  _Last,
const _Ty &  _Val 
)
inline
3051  { // find first matching _Val
3052  _DEBUG_RANGE(_First, _Last);
3053  return (_Rechecked(_First,
3054  _Find(_Unchecked(_First), _Unchecked(_Last), _Val)));
3055  }
_Iter & _Rechecked(_Iter &_Dest, _UIter _Src)
Definition: xutility:287
#define _DEBUG_RANGE(first, last)
Definition: xutility:467
_Iter _Unchecked(_Iter _Src)
Definition: xutility:279
_InIt _Find(_InIt _First, _InIt _Last, const _Ty &_Val, true_type)
Definition: xutility:3012
_FwdIt const _Ty _Val
Definition: algorithm:1938
_FwdIt _Last
Definition: algorithm:1936
template<class _FwdIt1 , class _FwdIt2 , class _Pr >
bool is_permutation ( _FwdIt1  _First1,
_FwdIt1  _Last1,
_FwdIt2  _First2,
_Pr  _Pred 
)
inline
3139  { // test if [_First1, _Last1) == permuted [_First2, ...), using _Pred
3140  _DEBUG_RANGE(_First1, _Last1);
3142  return _Is_permutation(_Unchecked(_First1), _Unchecked(_Last1),
3143  _Unchecked(_First2), _Pred);
3144  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
#define _DEBUG_RANGE(first, last)
Definition: xutility:467
bool _Is_permutation(_FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _Pr _Pred)
Definition: xutility:3111
_Iter _Unchecked(_Iter _Src)
Definition: xutility:279
#define _DEBUG_POINTER(first)
Definition: xutility:465
template<class _FwdIt1 , class _FwdIt2 >
bool is_permutation ( _FwdIt1  _First1,
_FwdIt1  _Last1,
_FwdIt2  _First2 
)
inline
3151  { // test if [_First1, _Last1) == permuted [_First2, ...)
3152  return (_STD is_permutation(_First1, _Last1,
3153  _First2, equal_to<>()));
3154  }
bool is_permutation(_FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _Pr _Pred)
Definition: xutility:3137
Definition: xstddef:177
template<class _InIt1 , class _InIt2 >
bool lexicographical_compare ( _InIt1  _First1,
_InIt1  _Last1,
_InIt2  _First2,
_InIt2  _Last2 
)
inline
2926  { // order [_First1, _Last1) vs. [_First2, _Last2)
2927  _DEBUG_RANGE(_First1, _Last1);
2928  _DEBUG_RANGE(_First2, _Last2);
2929  return (_Lexicographical_compare(_Unchecked(_First1), _Unchecked(_Last1),
2930  _Unchecked(_First2), _Unchecked(_Last2)));
2931  }
#define _DEBUG_RANGE(first, last)
Definition: xutility:467
_Iter _Unchecked(_Iter _Src)
Definition: xutility:279
bool _Lexicographical_compare(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _InIt2 _Last2)
Definition: xutility:2889
template<class _InIt1 , class _InIt2 , class _Pr >
bool lexicographical_compare ( _InIt1  _First1,
_InIt1  _Last1,
_InIt2  _First2,
_InIt2  _Last2,
_Pr  _Pred 
)
inline
2953  { // order [_First1, _Last1) vs. [_First2, _Last2) using _Pred
2954  _DEBUG_RANGE(_First1, _Last1);
2955  _DEBUG_RANGE(_First2, _Last2);
2957  return (_Lexicographical_compare(_Unchecked(_First1), _Unchecked(_Last1),
2958  _Unchecked(_First2), _Unchecked(_Last2), _Pred));
2959  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
#define _DEBUG_RANGE(first, last)
Definition: xutility:467
_Iter _Unchecked(_Iter _Src)
Definition: xutility:279
#define _DEBUG_POINTER(first)
Definition: xutility:465
bool _Lexicographical_compare(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _InIt2 _Last2)
Definition: xutility:2889
template<class _RanIt >
move_iterator<_RanIt> make_move_iterator ( _RanIt  _Iter)
inline
2034  { // make move_iterator from iterator
2035  return (move_iterator<_RanIt>(_Iter));
2036  }
Definition: xutility:1824
template<class _InIt , class _OutIt >
_OutIt move ( _InIt  _First,
_InIt  _Last,
_OutIt  _Dest 
)
inline
2449  { // move [_First, _Last) to [_Dest, ...)
2450  return (_Rechecked(_Dest,
2451  _Move(_Unchecked(_First), _Unchecked(_Last),
2452  _Unchecked(_Dest))));
2453  }
_Iter & _Rechecked(_Iter &_Dest, _UIter _Src)
Definition: xutility:287
_OutIt _Move(_InIt _First, _InIt _Last, _OutIt _Dest, _Nonscalar_ptr_iterator_tag)
Definition: xutility:2416
_Iter _Unchecked(_Iter _Src)
Definition: xutility:279
_FwdIt _Last
Definition: algorithm:1936
template<class _BidIt1 , class _BidIt2 >
_BidIt2 move_backward ( _BidIt1  _First,
_BidIt1  _Last,
_BidIt2  _Dest 
)
inline
2556  { // move [_First, _Last) backwards to [..., _Dest)
2557  return (_Rechecked(_Dest,
2559  _Unchecked(_Dest))));
2560  }
_BidIt2 _Move_backward(_BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest, _Nonscalar_ptr_iterator_tag)
Definition: xutility:2523
_Iter & _Rechecked(_Iter &_Dest, _UIter _Src)
Definition: xutility:287
_Iter _Unchecked(_Iter _Src)
Definition: xutility:279
_FwdIt _Last
Definition: algorithm:1936
template<class _FwdIt >
_FwdIt next ( _FwdIt  _First,
typename iterator_traits< _FwdIt >::difference_type  _Off = 1 
)
inline
773  { // increment iterator
774  static_assert((is_base_of<forward_iterator_tag,
776  "next requires forward iterator");
777 
778  _STD advance(_First, _Off);
779  return (_First);
780  }
void advance(_InIt &_Where, _Diff _Off)
Definition: xutility:695
Definition: xutility:308
_Iter::iterator_category iterator_category
Definition: xutility:371
template<class _RanIt1 , class _Base1 , class _RanIt2 , class _Base2 >
bool operator!= ( const _Revranit< _RanIt1, _Base1 > &  _Left,
const _Revranit< _RanIt2, _Base2 > &  _Right 
)
inline
963  { // test for reverse_iterator inequality
964  return (!(_Left == _Right));
965  }
template<class _RanIt1 , class _RanIt2 >
bool operator!= ( const reverse_iterator< _RanIt1 > &  _Left,
const reverse_iterator< _RanIt2 > &  _Right 
)
inline
1149  { // test for reverse_iterator inequality
1150  return (!(_Left == _Right));
1151  }
template<class _RanIt1 , class _RanIt2 >
bool operator!= ( const move_iterator< _RanIt1 > &  _Left,
const move_iterator< _RanIt2 > &  _Right 
)
inline
1991  { // test for move_iterator inequality
1992  return (!(_Left == _Right));
1993  }
template<class _RanIt , class _Base , class _Diff >
_Revranit<_RanIt, _Base> operator+ ( _Diff  _Off,
const _Revranit< _RanIt, _Base > &  _Right 
)
inline
929  { // return reverse_iterator + integer
930  return (_Right + _Off);
931  }
template<class _RanIt , class _Diff >
reverse_iterator<_RanIt> operator+ ( _Diff  _Off,
const reverse_iterator< _RanIt > &  _Right 
)
inline
1124  { // return reverse_iterator + integer
1125  return (_Right + _Off);
1126  }
template<class _Ty , size_t _Size>
_Array_const_iterator<_Ty, _Size> operator+ ( typename _Array_const_iterator< _Ty, _Size >::difference_type  _Off,
_Array_const_iterator< _Ty, _Size _Next 
)
inline
1679  { // add offset to iterator
1680  return (_Next += _Off);
1681  }
template<class _Ty , size_t _Size>
_Array_iterator<_Ty, _Size> operator+ ( typename _Array_iterator< _Ty, _Size >::difference_type  _Off,
_Array_iterator< _Ty, _Size _Next 
)
inline
1818  { // add offset to iterator
1819  return (_Next += _Off);
1820  }
template<class _RanIt , class _Diff >
move_iterator<_RanIt> operator+ ( _Diff  _Off,
const move_iterator< _RanIt > &  _Right 
)
inline
1963  { // return move_iterator + integer
1964  return (_Right + _Off);
1965  }
template<class _RanIt1 , class _Base1 , class _RanIt2 , class _Base2 >
auto operator- ( const _Revranit< _RanIt1, _Base1 > &  _Left,
const _Revranit< _RanIt2, _Base2 > &  _Right 
) -> decltype(_Right.base() - _Left.base())
inline
941  { // return difference of reverse_iterators
942  return (_Right.base() - _Left.base());
943  }
_RanIt base() const
Definition: xutility:828
template<class _RanIt1 , class _RanIt2 >
auto operator- ( const reverse_iterator< _RanIt1 > &  _Left,
const reverse_iterator< _RanIt2 > &  _Right 
) -> decltype(_Right.base() - _Left.base())
inline
template<class _RanIt1 , class _RanIt2 >
auto operator- ( move_iterator< _RanIt1 > &  _Left,
const move_iterator< _RanIt2 > &  _Right 
) -> decltype(_Left.base() - _Right.base())
inline
1973  { // test for move_iterator equality
1974  return (_Left.base() - _Right.base());
1975  }
_RanIt base() const
Definition: xutility:1860
template<class _RanIt1 , class _Base1 , class _RanIt2 , class _Base2 >
bool operator< ( const _Revranit< _RanIt1, _Base1 > &  _Left,
const _Revranit< _RanIt2, _Base2 > &  _Right 
)
inline
974  { // test for reverse_iterator < reverse_iterator
975  return (_Left._Less(_Right));
976  }
bool _Less(const _Revranit< _RanIt2, _Base2 > &_Right) const
Definition: xutility:908
template<class _RanIt1 , class _RanIt2 >
bool operator< ( const reverse_iterator< _RanIt1 > &  _Left,
const reverse_iterator< _RanIt2 > &  _Right 
)
inline
1157  { // test for reverse_iterator < reverse_iterator
1158  return (_Left._Less(_Right));
1159  }
template<class _RanIt1 , class _RanIt2 >
bool operator< ( const move_iterator< _RanIt1 > &  _Left,
const move_iterator< _RanIt2 > &  _Right 
)
inline
2000  { // test for move_iterator < move_iterator
2001  return (_Left._Less(_Right));
2002  }
bool _Less(const move_iterator< _RanIt2 > &_Right) const
Definition: xutility:1937
template<class _RanIt1 , class _Base1 , class _RanIt2 , class _Base2 >
bool operator<= ( const _Revranit< _RanIt1, _Base1 > &  _Left,
const _Revranit< _RanIt2, _Base2 > &  _Right 
)
inline
996  { // test for reverse_iterator <= reverse_iterator
997  return (!(_Right < _Left));
998  }
template<class _RanIt1 , class _RanIt2 >
bool operator<= ( const reverse_iterator< _RanIt1 > &  _Left,
const reverse_iterator< _RanIt2 > &  _Right 
)
inline
1173  { // test for reverse_iterator <= reverse_iterator
1174  return (!(_Right < _Left));
1175  }
template<class _RanIt1 , class _RanIt2 >
bool operator<= ( const move_iterator< _RanIt1 > &  _Left,
const move_iterator< _RanIt2 > &  _Right 
)
inline
2018  { // test for move_iterator <= move_iterator
2019  return (!(_Right < _Left));
2020  }
template<class _RanIt1 , class _Base1 , class _RanIt2 , class _Base2 >
bool operator== ( const _Revranit< _RanIt1, _Base1 > &  _Left,
const _Revranit< _RanIt2, _Base2 > &  _Right 
)
inline
952  { // test for reverse_iterator equality
953  return (_Left._Equal(_Right));
954  }
bool _Equal(const _Revranit< _RanIt2, _Base2 > &_Right) const
Definition: xutility:872
template<class _RanIt1 , class _RanIt2 >
bool operator== ( const reverse_iterator< _RanIt1 > &  _Left,
const reverse_iterator< _RanIt2 > &  _Right 
)
inline
1141  { // test for reverse_iterator equality
1142  return (_Left._Equal(_Right));
1143  }
template<class _RanIt1 , class _RanIt2 >
bool operator== ( const move_iterator< _RanIt1 > &  _Left,
const move_iterator< _RanIt2 > &  _Right 
)
inline
1982  { // test for move_iterator equality
1983  return (_Left._Equal(_Right));
1984  }
bool _Equal(const move_iterator< _RanIt2 > &_Right) const
Definition: xutility:1902
template<class _RanIt1 , class _Base1 , class _RanIt2 , class _Base2 >
bool operator> ( const _Revranit< _RanIt1, _Base1 > &  _Left,
const _Revranit< _RanIt2, _Base2 > &  _Right 
)
inline
985  { // test for reverse_iterator > reverse_iterator
986  return (_Right < _Left);
987  }
template<class _RanIt1 , class _RanIt2 >
bool operator> ( const reverse_iterator< _RanIt1 > &  _Left,
const reverse_iterator< _RanIt2 > &  _Right 
)
inline
1165  { // test for reverse_iterator > reverse_iterator
1166  return (_Right < _Left);
1167  }
template<class _RanIt1 , class _RanIt2 >
bool operator> ( const move_iterator< _RanIt1 > &  _Left,
const move_iterator< _RanIt2 > &  _Right 
)
inline
2009  { // test for move_iterator > move_iterator
2010  return (_Right < _Left);
2011  }
template<class _RanIt1 , class _Base1 , class _RanIt2 , class _Base2 >
bool operator>= ( const _Revranit< _RanIt1, _Base1 > &  _Left,
const _Revranit< _RanIt2, _Base2 > &  _Right 
)
inline
1007  { // test for reverse_iterator >= reverse_iterator
1008  return (!(_Left < _Right));
1009  }
template<class _RanIt1 , class _RanIt2 >
bool operator>= ( const reverse_iterator< _RanIt1 > &  _Left,
const reverse_iterator< _RanIt2 > &  _Right 
)
inline
1181  { // test for reverse_iterator >= reverse_iterator
1182  return (!(_Left < _Right));
1183  }
template<class _RanIt1 , class _RanIt2 >
bool operator>= ( const move_iterator< _RanIt1 > &  _Left,
const move_iterator< _RanIt2 > &  _Right 
)
inline
2027  { // test for move_iterator >= move_iterator
2028  return (!(_Left < _Right));
2029  }
template<class _BidIt >
_BidIt prev ( _BidIt  _First,
typename iterator_traits< _BidIt >::difference_type  _Off = 1 
)
inline
786  { // decrement iterator
787  static_assert((is_base_of<bidirectional_iterator_tag,
789  "prev requires bidirectional iterator");
790 
791  _STD advance(_First, -_Off);
792  return (_First);
793  }
void advance(_InIt &_Where, _Diff _Off)
Definition: xutility:695
Definition: xutility:313
_Iter::iterator_category iterator_category
Definition: xutility:371
template<class _Container >
auto rbegin ( _Container &  _Cont) -> decltype(_Cont.rbegin())
inline
1241  { // get beginning of reversed sequence
1242  return (_Cont.rbegin());
1243  }
template<class _Container >
auto rbegin ( const _Container &  _Cont) -> decltype(_Cont.rbegin())
inline
1247  { // get beginning of reversed sequence
1248  return (_Cont.rbegin());
1249  }
template<class _Ty , size_t _Size>
reverse_iterator<_Ty *> rbegin ( _Ty(&)  _Array[_Size])
inline
1266  { // get beginning of reversed array
1267  return (reverse_iterator<_Ty *>(_Array + _Size));
1268  }
Definition: xutility:1013
_Check_return_ _In_ long _Size
Definition: io.h:325
template<class _Elem >
reverse_iterator<const _Elem *> rbegin ( initializer_list< _Elem >  _Ilist)
inline
1279  { // get beginning of reversed sequence
1280  return (reverse_iterator<const _Elem *>(_Ilist.end()));
1281  }
const _Elem * end() const _NOEXCEPT
Definition: initializer_list:43
Definition: xutility:1013
template<class _Container >
auto rend ( _Container &  _Cont) -> decltype(_Cont.rend())
inline
1253  { // get end of reversed sequence
1254  return (_Cont.rend());
1255  }
template<class _Container >
auto rend ( const _Container &  _Cont) -> decltype(_Cont.rend())
inline
1259  { // get end of reversed sequence
1260  return (_Cont.rend());
1261  }
template<class _Ty , size_t _Size>
reverse_iterator<_Ty *> rend ( _Ty(&)  _Array[_Size])
inline
1273  { // get end of reversed array
1274  return (reverse_iterator<_Ty *>(_Array));
1275  }
Definition: xutility:1013
template<class _Elem >
reverse_iterator<const _Elem *> rend ( initializer_list< _Elem >  _Ilist)
inline
1285  { // get end of reversed sequence
1286  return (reverse_iterator<const _Elem *>(_Ilist.begin()));
1287  }
const _Elem * begin() const _NOEXCEPT
Definition: initializer_list:38
Definition: xutility:1013
template<class _BidIt >
void reverse ( _BidIt  _First,
_BidIt  _Last 
)
inline
3166  { // reverse elements in [_First, _Last)
3167  _DEBUG_RANGE(_First, _Last);
3168  _Reverse(_Unchecked(_First), _Unchecked(_Last), _Iter_cat(_First));
3169  }
#define _DEBUG_RANGE(first, last)
Definition: xutility:467
_Iter _Unchecked(_Iter _Src)
Definition: xutility:279
iterator_traits< _Iter >::iterator_category _Iter_cat(const _Iter &)
Definition: xutility:404
void _Reverse(_BidIt _First, _BidIt _Last, bidirectional_iterator_tag)
Definition: xutility:3158
_FwdIt _Last
Definition: algorithm:1936
template<class _FwdIt >
_FwdIt rotate ( _FwdIt  _First,
_FwdIt  _Mid,
_FwdIt  _Last 
)
inline
3240  { // rotate [_First, _Last)
3241  _DEBUG_RANGE(_First, _Mid);
3242  _DEBUG_RANGE(_Mid, _Last);
3243  if (_First != _Mid && _Mid != _Last)
3244  _Rotate(_Unchecked(_First), _Unchecked(_Mid), _Unchecked(_Last),
3245  _Iter_cat(_First));
3246  _STD advance(_First, _STD distance(_Mid, _Last));
3247  return (_First);
3248  }
#define _DEBUG_RANGE(first, last)
Definition: xutility:467
iterator_traits< _InIt >::difference_type distance(_InIt _First, _InIt _Last)
Definition: xutility:755
void _Rotate(_FwdIt _First, _FwdIt _Mid, _FwdIt _Last, forward_iterator_tag)
Definition: xutility:3173
_Iter _Unchecked(_Iter _Src)
Definition: xutility:279
iterator_traits< _Iter >::iterator_category _Iter_cat(const _Iter &)
Definition: xutility:404
void advance(_InIt &_Where, _Diff _Off)
Definition: xutility:695
_FwdIt _Last
Definition: algorithm:1936

Variable Documentation

template<class _Iter >
iterator_traits<_Iter>::difference_type* _Dist_type(_Iter)
inline
705  { // return distance type from arbitrary argument
706  return (0);
707  }
template<class _Iter >
iterator_traits<_Iter>::value_type* _Val_type(_Iter)
inline
645  { // return value type from arbitrary argument
646  return (0);
647  }
const allocator_arg_t allocator_arg = allocator_arg_t()