STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Macros | Functions
xmemory File Reference
#include <xmemory0>

Classes

class  raw_storage_iterator< _OutIt, _Ty >
 
class  _Temp_iterator< _Ty >
 
struct  _Temp_iterator< _Ty >::_Bufpar
 
class  auto_ptr< _Ty >
 
struct  auto_ptr_ref< _Ty >
 
class  auto_ptr< _Ty >
 

Macros

#define _XMEMORY_
 

Functions

template<class _Ty >
_STD_BEGIN pair< _Ty *, ptrdiff_tget_temporary_buffer (ptrdiff_t _Count) _NOEXCEPT
 
template<class _Ty >
void return_temporary_buffer (_Ty *_Pbuf)
 
template<class _InIt , class _Diff , class _FwdIt >
_FwdIt _Uninitialized_copy_n (_InIt _First, _Diff _Count, _FwdIt _Dest, input_iterator_tag)
 
template<class _InIt , class _Diff , class _FwdIt >
_FwdIt _Uninitialized_copy_n (_InIt _First, _Diff _Count, _FwdIt _Dest, forward_iterator_tag)
 
template<class _InIt , class _Diff , class _FwdIt >
_FwdIt _Uninitialized_copy_n (_InIt _First, _Diff _Count, _FwdIt _Dest, _Nonscalar_ptr_iterator_tag)
 
template<class _InIt , class _Diff , class _FwdIt >
_FwdIt _Uninitialized_copy_n (_InIt _First, _Diff _Count, _FwdIt _Dest, _Scalar_ptr_iterator_tag)
 
template<class _InIt , class _Diff , class _FwdIt >
_FwdIt _Uninitialized_copy_n (_InIt _First, _Diff _Count, _FwdIt _Dest)
 
template<class _InIt , class _Diff , class _FwdIt >
_FwdIt uninitialized_copy_n (_InIt _First, _Diff _Count, _FwdIt _Dest)
 
template<class _InIt , class _FwdIt >
_FwdIt _Uninitialized_copy0 (_InIt _First, _InIt _Last, _FwdIt _Dest, _Nonscalar_ptr_iterator_tag)
 
template<class _InIt , class _FwdIt >
_FwdIt _Uninitialized_copy0 (_InIt _First, _InIt _Last, _FwdIt _Dest, _Scalar_ptr_iterator_tag)
 
template<class _InIt , class _FwdIt >
_FwdIt _Uninitialized_copy0 (_InIt _First, _InIt _Last, _FwdIt _Dest)
 
template<class _InIt , class _FwdIt >
_FwdIt uninitialized_copy (_InIt _First, _InIt _Last, _FwdIt _Dest)
 
template<class _InIt , class _FwdIt , class _Alloc >
_FwdIt _Uninit_copy (_InIt _First, _InIt _Last, _FwdIt _Dest, _Wrap_alloc< _Alloc > &_Al, _Nonscalar_ptr_iterator_tag)
 
template<class _InIt , class _FwdIt , class _Alloc >
_FwdIt _Uninit_copy (_InIt _First, _InIt _Last, _FwdIt _Dest, _Wrap_alloc< _Alloc > &_Al, _Scalar_ptr_iterator_tag)
 
template<class _Ty1 , class _Ty2 >
_Ty2 * _Uninit_copy (_Ty1 *_First, _Ty1 *_Last, _Ty2 *_Dest, _Wrap_alloc< allocator< _Ty2 > > &, _Scalar_ptr_iterator_tag)
 
template<class _InIt , class _FwdIt , class _Alloc >
_FwdIt _Uninit_copy (_InIt _First, _InIt _Last, _FwdIt _Dest, _Alloc &_Al)
 
template<class _InIt , class _FwdIt , class _Alloc >
_FwdIt _Uninitialized_copy (_InIt _First, _InIt _Last, _FwdIt _Dest, _Alloc &_Al)
 
template<class _InIt , class _FwdIt , class _Alloc , class _Valty >
_FwdIt _Uninit_move (_InIt _First, _InIt _Last, _FwdIt _Dest, _Wrap_alloc< _Alloc > &_Al, _Valty *, _Nonscalar_ptr_iterator_tag)
 
template<class _InIt , class _FwdIt , class _Alloc , class _Valty >
_FwdIt _Uninit_move (_InIt _First, _InIt _Last, _FwdIt _Dest, _Wrap_alloc< _Alloc > &_Al, _Valty *, _Scalar_ptr_iterator_tag)
 
template<class _Ty1 , class _Ty2 , class _Valty >
_Ty2 * _Uninit_move (_Ty1 *_First, _Ty1 *_Last, _Ty2 *_Dest, _Wrap_alloc< allocator< _Ty2 > > &, _Valty *, _Scalar_ptr_iterator_tag)
 
template<class _InIt , class _FwdIt , class _Alloc >
_FwdIt _Uninit_move (_InIt _First, _InIt _Last, _FwdIt _Dest, _Alloc &_Al)
 
template<class _InIt , class _FwdIt , class _Alloc >
_FwdIt _Uninitialized_move (_InIt _First, _InIt _Last, _FwdIt _Dest, _Alloc &_Al)
 
template<class _FwdIt , class _Tval >
void _Uninit_fill (_FwdIt _First, _FwdIt _Last, const _Tval &_Val, _Nonscalar_ptr_iterator_tag)
 
template<class _Ty , class _Tval >
void _Uninit_fill (_Ty *_First, _Ty *_Last, const _Tval &_Val, _Scalar_ptr_iterator_tag)
 
template<class _FwdIt , class _Tval >
void uninitialized_fill (_FwdIt _First, _FwdIt _Last, const _Tval &_Val)
 
template<class _FwdIt , class _Diff , class _Tval >
_FwdIt _Uninit_fill_n (_FwdIt _First, _Diff _Count, const _Tval &_Val, _Nonscalar_ptr_iterator_tag)
 
template<class _Ty , class _Diff , class _Tval >
_Ty * _Uninit_fill_n (_Ty *_First, _Diff _Count, const _Tval &_Val, _Scalar_ptr_iterator_tag)
 
template<class _FwdIt , class _Diff , class _Tval >
_FwdIt uninitialized_fill_n (_FwdIt _First, _Diff _Count, const _Tval &_Val)
 
template<class _FwdIt , class _Diff , class _Tval , class _Alloc , class _Valty >
void _Uninit_fill_n (_FwdIt _First, _Diff _Count, const _Tval *_Pval, _Wrap_alloc< _Alloc > &_Al, _Valty *, _Nonscalar_ptr_iterator_tag)
 
template<class _FwdIt , class _Diff , class _Tval , class _Alloc , class _Valty >
void _Uninit_fill_n (_FwdIt _First, _Diff _Count, const _Tval *_Pval, _Wrap_alloc< _Alloc > &_Al, _Valty *, _Scalar_ptr_iterator_tag)
 
template<class _Ty , class _Diff , class _Tval , class _Valty >
void _Uninit_fill_n (_Ty *_First, _Diff _Count, const _Tval *_Pval, _Wrap_alloc< allocator< _Ty > > &, _Valty *, _Scalar_ptr_iterator_tag)
 
template<class _FwdIt , class _Diff , class _Tval , class _Alloc >
void _Uninitialized_fill_n (_FwdIt _First, _Diff _Count, const _Tval *_Pval, _Alloc &_Al)
 
template<class _FwdIt , class _Diff , class _Alloc , class _Valty >
void _Uninit_def_fill_n (_FwdIt _First, _Diff _Count, _Wrap_alloc< _Alloc > &_Al, _Valty *, _Nonscalar_ptr_iterator_tag)
 
template<class _FwdIt , class _Diff , class _Alloc , class _Valty >
void _Uninit_def_fill_n (_FwdIt _First, _Diff _Count, _Wrap_alloc< _Alloc > &_Al, _Valty *, _Scalar_ptr_iterator_tag)
 
template<class _Ty , class _Diff , class _Valty >
void _Uninit_def_fill_n (_Ty *_First, _Diff _Count, _Wrap_alloc< allocator< _Ty > > &, _Valty *, _Scalar_ptr_iterator_tag)
 
template<class _FwdIt , class _Diff , class _Alloc >
void _Uninitialized_default_fill_n (_FwdIt _First, _Diff _Count, _Alloc &_Al)
 

Macro Definition Documentation

#define _XMEMORY_

Function Documentation

template<class _InIt , class _FwdIt , class _Alloc >
_FwdIt _Uninit_copy ( _InIt  _First,
_InIt  _Last,
_FwdIt  _Dest,
_Wrap_alloc< _Alloc > &  _Al,
_Nonscalar_ptr_iterator_tag   
)
inline
371  { // copy [_First, _Last) to raw _Dest, using _Al, arbitrary type
372  _DEBUG_RANGE(_First, _Last);
373  _DEBUG_POINTER(_Dest);
374  _FwdIt _Next = _Dest;
375 
376  _TRY_BEGIN
377  for (; _First != _Last; ++_Dest, ++_First)
378  _Al.construct(_Dest, *_First);
379  _CATCH_ALL
380  for (; _Next != _Dest; ++_Next)
381  _Al.destroy(_Next);
382  _RERAISE;
383  _CATCH_END
384  return (_Dest);
385  }
#define _DEBUG_RANGE(first, last)
Definition: xutility:467
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
void destroy(_Ty *_Ptr)
Definition: xmemory0:877
void construct(value_type *_Ptr)
Definition: xmemory0:861
#define _CATCH_ALL
Definition: xstddef:62
#define _DEBUG_POINTER(first)
Definition: xutility:465
#define _RERAISE
Definition: xstddef:74
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _FwdIt , class _Alloc >
_FwdIt _Uninit_copy ( _InIt  _First,
_InIt  _Last,
_FwdIt  _Dest,
_Wrap_alloc< _Alloc > &  _Al,
_Scalar_ptr_iterator_tag   
)
inline
392  { // copy [_First, _Last) to raw _Dest, using _Al, scalar type
393  return (_Uninit_copy(_First, _Last, _Dest,
395  }
_FwdIt _Uninit_copy(_InIt _First, _InIt _Last, _FwdIt _Dest, _Wrap_alloc< _Alloc > &_Al, _Nonscalar_ptr_iterator_tag)
Definition: xmemory:369
_FwdIt _Last
Definition: algorithm:1936
Definition: xutility:324
template<class _Ty1 , class _Ty2 >
_Ty2* _Uninit_copy ( _Ty1 *  _First,
_Ty1 *  _Last,
_Ty2 *  _Dest,
_Wrap_alloc< allocator< _Ty2 > > &  ,
_Scalar_ptr_iterator_tag   
)
inline
401  { // copy [_First, _Last) to raw _Dest, scalar type
402  _DEBUG_RANGE(_First, _Last);
403  _DEBUG_POINTER(_Dest);
404  size_t _Count = (size_t)(_Last - _First);
405  return ((_Ty2 *)_CSTD memmove(&*_Dest, &*_First,
406  _Count * sizeof (*_First)) + _Count); // NB: non-overlapping move
407  }
#define _DEBUG_RANGE(first, last)
Definition: xutility:467
_W64 unsigned int size_t
Definition: crtdefs.h:496
#define _DEBUG_POINTER(first)
Definition: xutility:465
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:559
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _FwdIt , class _Alloc >
_FwdIt _Uninit_copy ( _InIt  _First,
_InIt  _Last,
_FwdIt  _Dest,
_Alloc &  _Al 
)
inline
414  { // copy [_First, _Last) to raw _Dest, using _Al
415  return (_Uninit_copy(_First, _Last, _Dest, _Al,
416  _Ptr_cat(_First, _Dest)));
417  }
_Nonscalar_ptr_iterator_tag _Ptr_cat(_Iter1 &, _Iter2 &)
Definition: xutility:413
_FwdIt _Uninit_copy(_InIt _First, _InIt _Last, _FwdIt _Dest, _Wrap_alloc< _Alloc > &_Al, _Nonscalar_ptr_iterator_tag)
Definition: xmemory:369
_FwdIt _Last
Definition: algorithm:1936
template<class _FwdIt , class _Diff , class _Alloc , class _Valty >
void _Uninit_def_fill_n ( _FwdIt  _First,
_Diff  _Count,
_Wrap_alloc< _Alloc > &  _Al,
_Valty *  ,
_Nonscalar_ptr_iterator_tag   
)
inline
645  { // copy _Count * _Valty() to raw _First, using _Al, arbitrary type
646  #if _ITERATOR_DEBUG_LEVEL == 2
647 // if (_Count < 0)
648 // _DEBUG_ERROR("negative count in uninitialized fill");
649  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
650 
651  _FwdIt _Next = _First;
652 
653  _TRY_BEGIN
654  for (; 0 < _Count; --_Count, ++_First)
655 
656  _Al.construct(_First);
657 
658  _CATCH_ALL
659  for (; _Next != _First; ++_Next)
660  _Al.destroy(_Next);
661  _RERAISE;
662  _CATCH_END
663  }
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
void destroy(_Ty *_Ptr)
Definition: xmemory0:877
void construct(value_type *_Ptr)
Definition: xmemory0:861
#define _CATCH_ALL
Definition: xstddef:62
_Diff _Count
Definition: algorithm:1941
#define _RERAISE
Definition: xstddef:74
template<class _FwdIt , class _Diff , class _Alloc , class _Valty >
void _Uninit_def_fill_n ( _FwdIt  _First,
_Diff  _Count,
_Wrap_alloc< _Alloc > &  _Al,
_Valty *  ,
_Scalar_ptr_iterator_tag   
)
inline
671  { // copy _Count * _Valty() to raw _First, using _Al, arbitrary type
672  _Uninit_def_fill_n(_First, _Count,
673  _Al, (_Valty *)0, _Nonscalar_ptr_iterator_tag());
674  }
void _Uninit_def_fill_n(_FwdIt _First, _Diff _Count, _Wrap_alloc< _Alloc > &_Al, _Valty *, _Nonscalar_ptr_iterator_tag)
Definition: xmemory:643
_Diff _Count
Definition: algorithm:1941
Definition: xutility:324
template<class _Ty , class _Diff , class _Valty >
void _Uninit_def_fill_n ( _Ty *  _First,
_Diff  _Count,
_Wrap_alloc< allocator< _Ty > > &  ,
_Valty *  ,
_Scalar_ptr_iterator_tag   
)
inline
681  { // copy _Count * _Valty() to raw _First, using _Al, scalar type
682  _Fill_n(_First, _Count, (_Valty)0);
683  }
_OutIt _Fill_n(_OutIt _Dest, _Diff _Count, const _Ty &_Val)
Definition: xutility:2630
_Diff _Count
Definition: algorithm:1941
template<class _FwdIt , class _Tval >
void _Uninit_fill ( _FwdIt  _First,
_FwdIt  _Last,
const _Tval &  _Val,
_Nonscalar_ptr_iterator_tag   
)
inline
503  { // copy _Val throughout raw [_First, _Last), arbitrary type
504  _DEBUG_RANGE(_First, _Last);
505  _FwdIt _Next = _First;
506 
507  _TRY_BEGIN
508  for (; _First != _Last; ++_First)
509  _Construct(&*_First, _Val);
510  _CATCH_ALL
511  for (; _Next != _First; ++_Next)
512  _Destroy(&*_Next);
513  _RERAISE;
514  _CATCH_END
515  }
#define _DEBUG_RANGE(first, last)
Definition: xutility:467
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
void _Construct(_Ty1 *_Ptr, _Ty2 &&_Val)
Definition: xmemory0:37
void _Destroy(_Ty *_Ptr)
Definition: xmemory0:53
#define _CATCH_ALL
Definition: xstddef:62
#define _RERAISE
Definition: xstddef:74
_FwdIt const _Ty _Val
Definition: algorithm:1938
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty , class _Tval >
void _Uninit_fill ( _Ty *  _First,
_Ty *  _Last,
const _Tval &  _Val,
_Scalar_ptr_iterator_tag   
)
inline
521  { // copy _Val throughout raw [_First, _Last), scalar type
522  _STD fill(_First, _Last, _Val);
523  }
void fill(_FwdIt _First, _FwdIt _Last, const _Ty &_Val)
Definition: xutility:2620
_FwdIt const _Ty _Val
Definition: algorithm:1938
_FwdIt _Last
Definition: algorithm:1936
template<class _FwdIt , class _Diff , class _Tval >
_FwdIt _Uninit_fill_n ( _FwdIt  _First,
_Diff  _Count,
const _Tval &  _Val,
_Nonscalar_ptr_iterator_tag   
)
inline
538  { // copy _Count *_Val to raw _First, arbitrary type
539  #if _ITERATOR_DEBUG_LEVEL == 2
540 // if (_Count < 0)
541 // _DEBUG_ERROR("negative count in uninitialized fill");
542  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
543 
544  _FwdIt _Next = _First;
545 
546  _TRY_BEGIN
547  for (; 0 < _Count; --_Count, ++_First)
548  _Construct(&*_First, _Val);
549  _CATCH_ALL
550  for (; _Next != _First; ++_Next)
551  _Destroy(&*_Next);
552  _RERAISE;
553  _CATCH_END
554 
555  return (_First);
556  }
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
void _Construct(_Ty1 *_Ptr, _Ty2 &&_Val)
Definition: xmemory0:37
void _Destroy(_Ty *_Ptr)
Definition: xmemory0:53
#define _CATCH_ALL
Definition: xstddef:62
_Diff _Count
Definition: algorithm:1941
#define _RERAISE
Definition: xstddef:74
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty , class _Diff , class _Tval >
_Ty* _Uninit_fill_n ( _Ty *  _First,
_Diff  _Count,
const _Tval &  _Val,
_Scalar_ptr_iterator_tag   
)
inline
563  { // copy _Count *_Val to raw _First, scalar type
564  return (_Fill_n(_First, _Count, _Val));
565  }
_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 _FwdIt , class _Diff , class _Tval , class _Alloc , class _Valty >
void _Uninit_fill_n ( _FwdIt  _First,
_Diff  _Count,
const _Tval *  _Pval,
_Wrap_alloc< _Alloc > &  _Al,
_Valty *  ,
_Nonscalar_ptr_iterator_tag   
)
inline
585  { // copy _Count * *_Pval to raw _First, using _Al, arbitrary type
586  #if _ITERATOR_DEBUG_LEVEL == 2
587 // if (_Count < 0)
588 // _DEBUG_ERROR("negative count in uninitialized fill");
589  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
590 
591  _FwdIt _Next = _First;
592 
593  _TRY_BEGIN
594  for (; 0 < _Count; --_Count, ++_First)
595  _Al.construct(_First, *_Pval);
596  _CATCH_ALL
597  for (; _Next != _First; ++_Next)
598  _Al.destroy(_Next);
599  _RERAISE;
600  _CATCH_END
601  }
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
void destroy(_Ty *_Ptr)
Definition: xmemory0:877
void construct(value_type *_Ptr)
Definition: xmemory0:861
#define _CATCH_ALL
Definition: xstddef:62
_Diff _Count
Definition: algorithm:1941
#define _RERAISE
Definition: xstddef:74
template<class _FwdIt , class _Diff , class _Tval , class _Alloc , class _Valty >
void _Uninit_fill_n ( _FwdIt  _First,
_Diff  _Count,
const _Tval *  _Pval,
_Wrap_alloc< _Alloc > &  _Al,
_Valty *  ,
_Scalar_ptr_iterator_tag   
)
inline
611  { // copy _Count * *_Pval to raw _First, using _Al, arbitrary type
612  _Uninit_fill_n(_First, _Count,
613  _Pval, _Al, (_Valty *)0, _Nonscalar_ptr_iterator_tag());
614  }
_FwdIt _Uninit_fill_n(_FwdIt _First, _Diff _Count, const _Tval &_Val, _Nonscalar_ptr_iterator_tag)
Definition: xmemory:536
_Diff _Count
Definition: algorithm:1941
Definition: xutility:324
template<class _Ty , class _Diff , class _Tval , class _Valty >
void _Uninit_fill_n ( _Ty *  _First,
_Diff  _Count,
const _Tval *  _Pval,
_Wrap_alloc< allocator< _Ty > > &  ,
_Valty *  ,
_Scalar_ptr_iterator_tag   
)
inline
623  { // copy _Count * *_Pval to raw _First, using _Al, scalar type
624  _Fill_n(_First, _Count, *_Pval);
625  }
_OutIt _Fill_n(_OutIt _Dest, _Diff _Count, const _Ty &_Val)
Definition: xutility:2630
_Diff _Count
Definition: algorithm:1941
template<class _InIt , class _FwdIt , class _Alloc , class _Valty >
_FwdIt _Uninit_move ( _InIt  _First,
_InIt  _Last,
_FwdIt  _Dest,
_Wrap_alloc< _Alloc > &  _Al,
_Valty *  ,
_Nonscalar_ptr_iterator_tag   
)
inline
437  { // move [_First, _Last) to raw _Dest, using _Al, arbitrary type
438  _DEBUG_RANGE(_First, _Last);
439  _DEBUG_POINTER(_Dest);
440  _FwdIt _Next = _Dest;
441 
442  _TRY_BEGIN
443  for (; _First != _Last; ++_Dest, ++_First)
444  _Al.construct(_Dest, (_Valty&&)*_First);
445  _CATCH_ALL
446  for (; _Next != _Dest; ++_Next)
447  _Al.destroy(_Next);
448  _RERAISE;
449  _CATCH_END
450  return (_Dest);
451  }
#define _DEBUG_RANGE(first, last)
Definition: xutility:467
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
void destroy(_Ty *_Ptr)
Definition: xmemory0:877
void construct(value_type *_Ptr)
Definition: xmemory0:861
#define _CATCH_ALL
Definition: xstddef:62
#define _DEBUG_POINTER(first)
Definition: xutility:465
#define _RERAISE
Definition: xstddef:74
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _FwdIt , class _Alloc , class _Valty >
_FwdIt _Uninit_move ( _InIt  _First,
_InIt  _Last,
_FwdIt  _Dest,
_Wrap_alloc< _Alloc > &  _Al,
_Valty *  ,
_Scalar_ptr_iterator_tag   
)
inline
459  { // move [_First, _Last) to raw _Dest, using _Al, scalar type
460  return (_Uninit_move(_First, _Last, _Dest,
461  _Al, (_Valty *)0, _Nonscalar_ptr_iterator_tag()));
462  }
_FwdIt _Uninit_move(_InIt _First, _InIt _Last, _FwdIt _Dest, _Wrap_alloc< _Alloc > &_Al, _Valty *, _Nonscalar_ptr_iterator_tag)
Definition: xmemory:435
_FwdIt _Last
Definition: algorithm:1936
Definition: xutility:324
template<class _Ty1 , class _Ty2 , class _Valty >
_Ty2* _Uninit_move ( _Ty1 *  _First,
_Ty1 *  _Last,
_Ty2 *  _Dest,
_Wrap_alloc< allocator< _Ty2 > > &  ,
_Valty *  ,
_Scalar_ptr_iterator_tag   
)
inline
469  { // move [_First, _Last) to raw _Dest, scalar type
470  _DEBUG_RANGE(_First, _Last);
471  _DEBUG_POINTER(_Dest);
472  size_t _Count = (size_t)(_Last - _First);
473  return ((_Ty2 *)_CSTD memmove(&*_Dest, &*_First,
474  _Count * sizeof (*_First)) + _Count); // NB: non-overlapping move
475  }
#define _DEBUG_RANGE(first, last)
Definition: xutility:467
_W64 unsigned int size_t
Definition: crtdefs.h:496
#define _DEBUG_POINTER(first)
Definition: xutility:465
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:559
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _FwdIt , class _Alloc >
_FwdIt _Uninit_move ( _InIt  _First,
_InIt  _Last,
_FwdIt  _Dest,
_Alloc &  _Al 
)
inline
482  { // move [_First, _Last) to raw _Dest, using _Al
483  return (_Uninit_move(_First, _Last, _Dest, _Al,
484  _Val_type(_First), _Ptr_cat(_First, _Dest)));
485  }
_FwdIt _Uninit_move(_InIt _First, _InIt _Last, _FwdIt _Dest, _Wrap_alloc< _Alloc > &_Al, _Valty *, _Nonscalar_ptr_iterator_tag)
Definition: xmemory:435
iterator_traits< _Iter >::value_type * _Val_type(_Iter)
Definition: xutility:644
_Nonscalar_ptr_iterator_tag _Ptr_cat(_Iter1 &, _Iter2 &)
Definition: xutility:413
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _FwdIt , class _Alloc >
_FwdIt _Uninitialized_copy ( _InIt  _First,
_InIt  _Last,
_FwdIt  _Dest,
_Alloc &  _Al 
)
inline
424  { // copy [_First, _Last) to raw _Dest, using _Al
425  return (_Rechecked(_Dest,
427  _Unchecked(_Dest), _Al)));
428  }
_Deque_const_iterator< _Mydeque > & _Rechecked(_Deque_const_iterator< _Mydeque > &_Iter, typename _Deque_const_iterator< _Mydeque >::_Unchecked_type _Right)
Definition: deque:547
_Iter_t _Unchecked(_Iter_t _Iter)
Definition: iterator:11
_FwdIt _Uninit_copy(_InIt _First, _InIt _Last, _FwdIt _Dest, _Wrap_alloc< _Alloc > &_Al, _Nonscalar_ptr_iterator_tag)
Definition: xmemory:369
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _FwdIt >
_FwdIt _Uninitialized_copy0 ( _InIt  _First,
_InIt  _Last,
_FwdIt  _Dest,
_Nonscalar_ptr_iterator_tag   
)
inline
255  { // copy [_First, _Last) to raw [_Dest, ...), arbitrary iterators
256  _FwdIt _Next = _Dest;
257 
258  _TRY_BEGIN
259  for (; _First != _Last; ++_Dest, ++_First)
260  _Construct(&*_Dest, *_First);
261  _CATCH_ALL
262  for (; _Next != _Dest; ++_Next)
263  _Destroy(&*_Next);
264  _RERAISE;
265  _CATCH_END
266  return (_Dest);
267  }
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
void _Construct(_Ty1 *_Ptr, _Ty2 &&_Val)
Definition: xmemory0:37
void _Destroy(_Ty *_Ptr)
Definition: xmemory0:53
#define _CATCH_ALL
Definition: xstddef:62
#define _RERAISE
Definition: xstddef:74
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _FwdIt >
_FwdIt _Uninitialized_copy0 ( _InIt  _First,
_InIt  _Last,
_FwdIt  _Dest,
_Scalar_ptr_iterator_tag   
)
inline
273  { // copy [_First, _Last) to raw [_Dest, ...), pointers to scalars
274  ptrdiff_t _Count = _Last - _First;
275  _CSTD memmove(&*_Dest, &*_First,
276  _Count * sizeof (*_First));
277  return (_Dest + _Count);
278  }
_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 _FwdIt >
_FwdIt _Uninitialized_copy0 ( _InIt  _First,
_InIt  _Last,
_FwdIt  _Dest 
)
inline
284  { // copy [_First, _Last) to raw [_Dest, ...)
285  return (_Uninitialized_copy0(_First, _Last,
286  _Dest, _Ptr_cat(_First, _Dest)));
287  }
_FwdIt _Uninitialized_copy0(_InIt _First, _InIt _Last, _FwdIt _Dest, _Nonscalar_ptr_iterator_tag)
Definition: xmemory:253
_Nonscalar_ptr_iterator_tag _Ptr_cat(_Iter1 &, _Iter2 &)
Definition: xutility:413
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _Diff , class _FwdIt >
_FwdIt _Uninitialized_copy_n ( _InIt  _First,
_Diff  _Count,
_FwdIt  _Dest,
input_iterator_tag   
)
inline
50  { // copy [_First, _First + _Count) to [_Dest, ...), input iterators
51  _FwdIt _Next = _Dest;
52 
54  _Construct(&*_Dest, *_First); // 0 < _Count has been guaranteed
55  while (0 < --_Count)
56  _Construct(&*++_Dest, *++_First);
58  for (; _Next != _Dest; ++_Next)
59  _Destroy(&*_Next);
60  _RERAISE;
62  return (++_Dest);
63  }
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
void _Construct(_Ty1 *_Ptr, _Ty2 &&_Val)
Definition: xmemory0:37
void _Destroy(_Ty *_Ptr)
Definition: xmemory0:53
#define _CATCH_ALL
Definition: xstddef:62
_Diff _Count
Definition: algorithm:1941
#define _RERAISE
Definition: xstddef:74
template<class _InIt , class _Diff , class _FwdIt >
_FwdIt _Uninitialized_copy_n ( _InIt  _First,
_Diff  _Count,
_FwdIt  _Dest,
forward_iterator_tag   
)
inline
70  { // copy [_First, _First + _Count) to [_Dest, ...), forward iterators
71  _FwdIt _Next = _Dest;
72 
74  for (; 0 < _Count; --_Count, ++_Dest, ++_First)
75  _Construct(&*_Dest, *_First);
77  for (; _Next != _Dest; ++_Next)
78  _Destroy(&*_Next);
79  _RERAISE;
81  return (_Dest);
82  }
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
void _Construct(_Ty1 *_Ptr, _Ty2 &&_Val)
Definition: xmemory0:37
void _Destroy(_Ty *_Ptr)
Definition: xmemory0:53
#define _CATCH_ALL
Definition: xstddef:62
_Diff _Count
Definition: algorithm:1941
#define _RERAISE
Definition: xstddef:74
template<class _InIt , class _Diff , class _FwdIt >
_FwdIt _Uninitialized_copy_n ( _InIt  _First,
_Diff  _Count,
_FwdIt  _Dest,
_Nonscalar_ptr_iterator_tag   
)
inline
89  { // copy [_First, _First + _Count) to [_Dest, ...), arbitrary iterators
90  return (_Uninitialized_copy_n(_First, _Count,
91  _Dest, _Iter_cat(_First)));
92  }
_FwdIt _Uninitialized_copy_n(_InIt _First, _Diff _Count, _FwdIt _Dest, input_iterator_tag)
Definition: xmemory:48
iterator_traits< _Iter >::iterator_category _Iter_cat(const _Iter &)
Definition: xutility:404
_Diff _Count
Definition: algorithm:1941
template<class _InIt , class _Diff , class _FwdIt >
_FwdIt _Uninitialized_copy_n ( _InIt  _First,
_Diff  _Count,
_FwdIt  _Dest,
_Scalar_ptr_iterator_tag   
)
inline
99  { // copy [_First, _First + _Count) to [_Dest, ...), pointers to scalars
100  _CSTD memmove(&*_Dest, &*_First,
101  _Count * sizeof (*_First));
102  return (_Dest + _Count);
103  }
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:559
template<class _InIt , class _Diff , class _FwdIt >
_FwdIt _Uninitialized_copy_n ( _InIt  _First,
_Diff  _Count,
_FwdIt  _Dest 
)
inline
110  { // copy [_First, _First + _Count) to [_Dest, ...), unchecked
111  return (_Uninitialized_copy_n(_First, _Count,
112  _Dest, _Ptr_cat(_First, _Dest)));
113  }
_FwdIt _Uninitialized_copy_n(_InIt _First, _Diff _Count, _FwdIt _Dest, input_iterator_tag)
Definition: xmemory:48
_Nonscalar_ptr_iterator_tag _Ptr_cat(_Iter1 &, _Iter2 &)
Definition: xutility:413
_Diff _Count
Definition: algorithm:1941
template<class _FwdIt , class _Diff , class _Alloc >
void _Uninitialized_default_fill_n ( _FwdIt  _First,
_Diff  _Count,
_Alloc &  _Al 
)
inline
690  { // copy _Count * _Val_type(_First)() to raw _First, using _Al
691  _Uninit_def_fill_n(_First, _Count, _Al,
692  _Val_type(_First), _Ptr_cat(_First, _First));
693  }
iterator_traits< _Iter >::value_type * _Val_type(_Iter)
Definition: xutility:644
_Nonscalar_ptr_iterator_tag _Ptr_cat(_Iter1 &, _Iter2 &)
Definition: xutility:413
void _Uninit_def_fill_n(_FwdIt _First, _Diff _Count, _Wrap_alloc< _Alloc > &_Al, _Valty *, _Nonscalar_ptr_iterator_tag)
Definition: xmemory:643
_Diff _Count
Definition: algorithm:1941
template<class _FwdIt , class _Diff , class _Tval , class _Alloc >
void _Uninitialized_fill_n ( _FwdIt  _First,
_Diff  _Count,
const _Tval *  _Pval,
_Alloc &  _Al 
)
inline
633  { // copy _Count * *_Pval to raw _First, using _Al
634  _Uninit_fill_n(_First, _Count, _Pval, _Al,
635  _Val_type(_First), _Ptr_cat(_First, _First));
636  }
iterator_traits< _Iter >::value_type * _Val_type(_Iter)
Definition: xutility:644
_Nonscalar_ptr_iterator_tag _Ptr_cat(_Iter1 &, _Iter2 &)
Definition: xutility:413
_FwdIt _Uninit_fill_n(_FwdIt _First, _Diff _Count, const _Tval &_Val, _Nonscalar_ptr_iterator_tag)
Definition: xmemory:536
_Diff _Count
Definition: algorithm:1941
template<class _InIt , class _FwdIt , class _Alloc >
_FwdIt _Uninitialized_move ( _InIt  _First,
_InIt  _Last,
_FwdIt  _Dest,
_Alloc &  _Al 
)
inline
492  { // move [_First, _Last) to raw _Dest, using _Al
493  return (_Rechecked(_Dest,
495  _Unchecked(_Dest), _Al)));
496  }
_FwdIt _Uninit_move(_InIt _First, _InIt _Last, _FwdIt _Dest, _Wrap_alloc< _Alloc > &_Al, _Valty *, _Nonscalar_ptr_iterator_tag)
Definition: xmemory:435
_Deque_const_iterator< _Mydeque > & _Rechecked(_Deque_const_iterator< _Mydeque > &_Iter, typename _Deque_const_iterator< _Mydeque >::_Unchecked_type _Right)
Definition: deque:547
_Iter_t _Unchecked(_Iter_t _Iter)
Definition: iterator:11
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty >
_STD_BEGIN pair<_Ty *, ptrdiff_t> get_temporary_buffer ( ptrdiff_t  _Count)
inline
22  { // get raw temporary buffer of up to _Count elements
23  _Ty *_Pbuf;
24 
25  if (_Count < 0)
26  _Count = 0;
27  else if (((size_t)(-1) / sizeof (_Ty) < _Count))
28  _Xbad_alloc(); // report no memory
29  for (_Pbuf = 0; 0 < _Count; _Count /= 2)
30  if ((_Pbuf = (_Ty *)operator new(
31  (size_t)_Count * sizeof (_Ty), nothrow)) != 0)
32  break;
33 
34  return (pair<_Ty *, ptrdiff_t>(_Pbuf, _Count));
35  }
Definition: utility:80
_Diff _Count
Definition: algorithm:1941
const nothrow_t nothrow
template<class _Ty >
void return_temporary_buffer ( _Ty *  _Pbuf)
inline
40  { // delete raw temporary buffer
41  operator delete(_Pbuf);
42  }
template<class _InIt , class _FwdIt >
_FwdIt uninitialized_copy ( _InIt  _First,
_InIt  _Last,
_FwdIt  _Dest 
)
inline
294  { // copy [_First, _Last) to raw [_Dest, ...)
295  return (_Rechecked(_Dest,
297  _Unchecked(_Dest))));
298  }
_FwdIt _Uninitialized_copy0(_InIt _First, _InIt _Last, _FwdIt _Dest, _Nonscalar_ptr_iterator_tag)
Definition: xmemory:253
_Deque_const_iterator< _Mydeque > & _Rechecked(_Deque_const_iterator< _Mydeque > &_Iter, typename _Deque_const_iterator< _Mydeque >::_Unchecked_type _Right)
Definition: deque:547
_Iter_t _Unchecked(_Iter_t _Iter)
Definition: iterator:11
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class _Diff , class _FwdIt >
_FwdIt uninitialized_copy_n ( _InIt  _First,
_Diff  _Count,
_FwdIt  _Dest 
)
inline
121  { // copy [_First, _First + _Count) to [_Dest, ...)
122  if (_Count <= 0)
123  return (_Dest);
124  else
125  return (_Rechecked(_Dest,
127  _Unchecked(_Dest))));
128  }
_Deque_const_iterator< _Mydeque > & _Rechecked(_Deque_const_iterator< _Mydeque > &_Iter, typename _Deque_const_iterator< _Mydeque >::_Unchecked_type _Right)
Definition: deque:547
_FwdIt _Uninitialized_copy_n(_InIt _First, _Diff _Count, _FwdIt _Dest, input_iterator_tag)
Definition: xmemory:48
_Iter_t _Unchecked(_Iter_t _Iter)
Definition: iterator:11
_Diff _Count
Definition: algorithm:1941
template<class _FwdIt , class _Tval >
void uninitialized_fill ( _FwdIt  _First,
_FwdIt  _Last,
const _Tval &  _Val 
)
inline
528  { // copy _Val throughout raw [_First, _Last)
529  _Uninit_fill(_First, _Last, _Val, _Ptr_cat(_First, _First));
530  }
void _Uninit_fill(_FwdIt _First, _FwdIt _Last, const _Tval &_Val, _Nonscalar_ptr_iterator_tag)
Definition: xmemory:501
_Nonscalar_ptr_iterator_tag _Ptr_cat(_Iter1 &, _Iter2 &)
Definition: xutility:413
_FwdIt const _Ty _Val
Definition: algorithm:1938
_FwdIt _Last
Definition: algorithm:1936
template<class _FwdIt , class _Diff , class _Tval >
_FwdIt uninitialized_fill_n ( _FwdIt  _First,
_Diff  _Count,
const _Tval &  _Val 
)
inline
572  { // copy _Count *_Val to raw _First
573  return (_Uninit_fill_n(_First, _Count, _Val, _Ptr_cat(_First, _First)));
574  }
_Nonscalar_ptr_iterator_tag _Ptr_cat(_Iter1 &, _Iter2 &)
Definition: xutility:413
_FwdIt _Uninit_fill_n(_FwdIt _First, _Diff _Count, const _Tval &_Val, _Nonscalar_ptr_iterator_tag)
Definition: xmemory:536
_Diff _Count
Definition: algorithm:1941
_FwdIt const _Ty _Val
Definition: algorithm:1938