ReactOS  r76032
_algobase.h File Reference
#include <stl/_cstddef.h>
#include <stl/_cstring.h>
#include <climits>
#include <stl/_cstdlib.h>
#include <stl/_pair.h>
#include <stl/_iterator_base.h>
#include <stl/type_traits.h>
#include <stl/_algobase.c>
Include dependency graph for _algobase.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _STLP_DECLARE_COPY_TRIVIAL(_Tp)
 

Functions

template<class _Tp >
_STLP_BEGIN_NAMESPACE void swap (_Tp &__a, _Tp &__b)
 
template<class _ForwardIter1 , class _ForwardIter2 , class _Value >
_STLP_MOVE_TO_PRIV_NAMESPACE void __iter_swap_aux_aux (_ForwardIter1 &__i1, _ForwardIter2 &__i2, _Value *)
 
template<class _ForwardIter1 , class _ForwardIter2 >
void __iter_swap_aux (_ForwardIter1 &__i1, _ForwardIter2 &__i2, const __true_type &)
 
template<class _ForwardIter1 , class _ForwardIter2 >
void __iter_swap_aux (_ForwardIter1 &__i1, _ForwardIter2 &__i2, const __false_type &)
 
template<class _ForwardIter1 , class _ForwardIter2 >
_STLP_MOVE_TO_STD_NAMESPACE void iter_swap (_ForwardIter1 __i1, _ForwardIter2 __i2)
 
template<class _Tp >
const _Tp &() min (const _Tp &__a, const _Tp &__b)
 
template<class _Tp >
const _Tp &() max (const _Tp &__a, const _Tp &__b)
 
template<class _Tp , class _Compare >
const _Tp &() min (const _Tp &__a, const _Tp &__b, _Compare __comp)
 
template<class _Tp , class _Compare >
const _Tp &() max (const _Tp &__a, const _Tp &__b, _Compare __comp)
 
template<class _InputIter , class _OutputIter , class _Distance >
_STLP_MOVE_TO_PRIV_NAMESPACE
_OutputIter 
__copy (_InputIter __first, _InputIter __last, _OutputIter __result, const input_iterator_tag &, _Distance *)
 
template<class _RandomAccessIter , class _OutputIter , class _Distance >
_OutputIter __copy (_RandomAccessIter __first, _RandomAccessIter __last, _OutputIter __result, const random_access_iterator_tag &, _Distance *)
 
void__copy_trivial (const void *__first, const void *__last, void *__result)
 
template<class _BidirectionalIter1 , class _BidirectionalIter2 , class _Distance >
_BidirectionalIter2 __copy_backward (_BidirectionalIter1 __first, _BidirectionalIter1 __last, _BidirectionalIter2 __result, const bidirectional_iterator_tag &, _Distance *)
 
template<class _RandomAccessIter , class _BidirectionalIter , class _Distance >
_BidirectionalIter __copy_backward (_RandomAccessIter __first, _RandomAccessIter __last, _BidirectionalIter __result, const random_access_iterator_tag &, _Distance *)
 
void__copy_trivial_backward (const void *__first, const void *__last, void *__result)
 
template<class _InputIter , class _OutputIter >
_OutputIter __copy_ptrs (_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type &)
 
template<class _InputIter , class _OutputIter >
_OutputIter __copy_ptrs (_InputIter __first, _InputIter __last, _OutputIter __result, const __true_type &)
 
template<class _InputIter , class _OutputIter >
_OutputIter __copy_aux (_InputIter __first, _InputIter __last, _OutputIter __result, const __true_type &)
 
template<class _InputIter , class _OutputIter >
_OutputIter __copy_aux (_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type &)
 
template<class _InputIter , class _OutputIter >
_STLP_MOVE_TO_STD_NAMESPACE
_OutputIter 
copy (_InputIter __first, _InputIter __last, _OutputIter __result)
 
template<class _InputIter , class _OutputIter >
_STLP_MOVE_TO_PRIV_NAMESPACE
_OutputIter 
__copy_backward_ptrs (_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type &)
 
template<class _InputIter , class _OutputIter >
_OutputIter __copy_backward_ptrs (_InputIter __first, _InputIter __last, _OutputIter __result, const __true_type &)
 
template<class _InputIter , class _OutputIter >
_OutputIter __copy_backward_aux (_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type &)
 
template<class _InputIter , class _OutputIter >
_OutputIter __copy_backward_aux (_InputIter __first, _InputIter __last, _OutputIter __result, const __true_type &)
 
template<class _InputIter , class _OutputIter >
_STLP_MOVE_TO_STD_NAMESPACE
_OutputIter 
copy_backward (_InputIter __first, _InputIter __last, _OutputIter __result)
 
template<class _InputIter , class _Size , class _OutputIter >
_STLP_MOVE_TO_PRIV_NAMESPACE
_STLP_INLINE_LOOP
_STLP_STD::pair< _InputIter,
_OutputIter > 
__copy_n (_InputIter __first, _Size __count, _OutputIter __result, const input_iterator_tag &)
 
template<class _RAIter , class _Size , class _OutputIter >
_STLP_STD::pair< _RAIter,
_OutputIter > 
__copy_n (_RAIter __first, _Size __count, _OutputIter __result, const random_access_iterator_tag &)
 
template<class _InputIter , class _Size , class _OutputIter >
_STLP_MOVE_TO_STD_NAMESPACE
pair< _InputIter, _OutputIter > 
copy_n (_InputIter __first, _Size __count, _OutputIter __result)
 
template<class _ForwardIter , class _Tp >
_STLP_MOVE_TO_PRIV_NAMESPACE
_STLP_INLINE_LOOP void 
__fill_fwd (_ForwardIter __first, _ForwardIter __last, const _Tp &__val)
 
template<class _ForwardIter , class _Tp , class _Distance >
void __fill (_ForwardIter __first, _ForwardIter __last, const _Tp &__val, const input_iterator_tag &, _Distance *)
 
template<class _RandomAccessIter , class _Tp , class _Distance >
_STLP_INLINE_LOOP void __fill (_RandomAccessIter __first, _RandomAccessIter __last, const _Tp &__val, const random_access_iterator_tag &, _Distance *)
 
template<class _ForwardIter , class _Tp >
_STLP_MOVE_TO_STD_NAMESPACE void fill (_ForwardIter __first, _ForwardIter __last, const _Tp &__val)
 
void fill (unsigned char *__first, unsigned char *__last, const unsigned char &__val)
 
void fill (signed char *__first, signed char *__last, const signed char &__val)
 
void fill (char *__first, char *__last, const char &__val)
 
template<class _OutputIter , class _Size , class _Tp >
_STLP_MOVE_TO_PRIV_NAMESPACE
_STLP_INLINE_LOOP _OutputIter 
__fill_n (_OutputIter __first, _Size __n, const _Tp &__val)
 
template<class _OutputIter , class _Size , class _Tp >
_STLP_MOVE_TO_STD_NAMESPACE void fill_n (_OutputIter __first, _Size __n, const _Tp &__val)
 
template<class _InputIter1 , class _InputIter2 >
_STLP_INLINE_LOOP
_STLP_STD::pair< _InputIter1,
_InputIter2 > 
mismatch (_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2)
 
template<class _InputIter1 , class _InputIter2 , class _BinaryPredicate >
_STLP_INLINE_LOOP
_STLP_STD::pair< _InputIter1,
_InputIter2 > 
mismatch (_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _BinaryPredicate __binary_pred)
 
template<class _InputIter1 , class _InputIter2 >
_STLP_INLINE_LOOP bool equal (_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2)
 
template<class _InputIter1 , class _InputIter2 , class _BinaryPredicate >
_STLP_INLINE_LOOP bool equal (_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _BinaryPredicate __binary_pred)
 
template<class _InputIter1 , class _InputIter2 >
bool lexicographical_compare (_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2)
 
template<class _InputIter1 , class _InputIter2 , class _Compare >
bool lexicographical_compare (_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _Compare __comp)
 
bool lexicographical_compare (const unsigned char *__first1, const unsigned char *__last1, const unsigned char *__first2, const unsigned char *__last2)
 
template<class _InputIter1 , class _InputIter2 >
_STLP_MOVE_TO_PRIV_NAMESPACE int __lexicographical_compare_3way (_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2)
 
int __lexicographical_compare_3way (const unsigned char *__first1, const unsigned char *__last1, const unsigned char *__first2, const unsigned char *__last2)
 
template<class _InputIter1 , class _InputIter2 >
_STLP_MOVE_TO_STD_NAMESPACE int lexicographical_compare_3way (_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2)
 
template<class _InputIter , class _Tp >
_STLP_INLINE_LOOP _STLP_DIFFERENCE_TYPE (_InputIter) count(_InputIter __first
 
 for (;__first!=__last;++__first) if(*__first
 
template<class _InputIter , class _Tp >
_InputIter find (_InputIter __first, _InputIter __last, const _Tp &__val)
 
template<class _InputIter , class _Predicate >
_InputIter find_if (_InputIter __first, _InputIter __last, _Predicate __pred)
 
template<class _ForwardIter1 , class _ForwardIter2 , class _BinaryPred >
_ForwardIter1 search (_ForwardIter1 __first1, _ForwardIter1 __last1, _ForwardIter2 __first2, _ForwardIter2 __last2, _BinaryPred __predicate)
 
template<class _InputIter , class _ForwardIter >
_STLP_MOVE_TO_PRIV_NAMESPACE
_InputIter 
__find_first_of (_InputIter __first1, _InputIter __last1, _ForwardIter __first2, _ForwardIter __last2)
 
template<class _InputIter , class _ForwardIter , class _BinaryPredicate >
_InputIter __find_first_of (_InputIter __first1, _InputIter __last1, _ForwardIter __first2, _ForwardIter __last2, _BinaryPredicate __comp)
 
template<class _ForwardIter1 , class _ForwardIter2 , class _BinaryPredicate >
_STLP_MOVE_TO_STD_NAMESPACE
_ForwardIter1 
find_end (_ForwardIter1 __first1, _ForwardIter1 __last1, _ForwardIter2 __first2, _ForwardIter2 __last2, _BinaryPredicate __comp)
 
template<class _ForwardIter , class _Tp >
_STLP_INLINE_LOOP void replace (_ForwardIter __first, _ForwardIter __last, const _Tp &__old_value, const _Tp &__new_value)
 
template<class _ForwardIter , class _Tp , class _Compare1 , class _Compare2 , class _Distance >
_STLP_MOVE_TO_PRIV_NAMESPACE
_ForwardIter 
__lower_bound (_ForwardIter __first, _ForwardIter __last, const _Tp &__val, _Compare1 __comp1, _Compare2 __comp2, _Distance *)
 

Variables

_STLP_INLINE_LOOP _InputIter __last
 
_STLP_INLINE_LOOP _InputIter
const _Tp & 
__val
 
return __n
 

Macro Definition Documentation

#define _STLP_DECLARE_COPY_TRIVIAL (   _Tp)
Value:
inline _Tp* copy(const _Tp* __first, const _Tp* __last, _Tp* __result) \
{ return (_Tp*)_STLP_PRIV __copy_trivial(__first, __last, __result); } \
inline _Tp* copy_backward(const _Tp* __first, const _Tp* __last, _Tp* __result) \
{ return (_Tp*)_STLP_PRIV __copy_trivial_backward(__first, __last, __result); }
#define inline
Definition: compiler.h:135
#define _STLP_PRIV
Definition: _dm.h:70
void * __copy_trivial_backward(const void *__first, const void *__last, void *__result)
Definition: _algobase.h:254
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
void * __copy_trivial(const void *__first, const void *__last, void *__result)
Definition: _algobase.h:222
_STLP_MOVE_TO_STD_NAMESPACE _OutputIter copy_backward(_InputIter __first, _InputIter __last, _OutputIter __result)
Definition: _algobase.h:328
_STLP_MOVE_TO_STD_NAMESPACE _OutputIter copy(_InputIter __first, _InputIter __last, _OutputIter __result)
Definition: _algobase.h:291

Definition at line 334 of file _algobase.h.

Function Documentation

template<class _InputIter , class _OutputIter , class _Distance >
_STLP_MOVE_TO_PRIV_NAMESPACE _OutputIter __copy ( _InputIter  __first,
_InputIter  __last,
_OutputIter  __result,
const input_iterator_tag ,
_Distance *   
)
inline

Definition at line 184 of file _algobase.h.

Referenced by __copy_aux(), and __copy_ptrs().

185  {
186  for ( ; __first != __last; ++__result, ++__first)
187  *__result = *__first;
188  return __result;
189 }
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
template<class _RandomAccessIter , class _OutputIter , class _Distance >
_OutputIter __copy ( _RandomAccessIter  __first,
_RandomAccessIter  __last,
_OutputIter  __result,
const random_access_iterator_tag ,
_Distance *   
)
inline

Definition at line 211 of file _algobase.h.

212  {
213  for (_Distance __n = __last - __first; __n > 0; --__n) {
214  *__result = *__first;
215  ++__first;
216  ++__result;
217  }
218  return __result;
219 }
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
return __n
Definition: _algobase.h:662
template<class _InputIter , class _OutputIter >
_OutputIter __copy_aux ( _InputIter  __first,
_InputIter  __last,
_OutputIter  __result,
const __true_type  
)
inline

Definition at line 273 of file _algobase.h.

Referenced by copy().

274  {
275  return _STLP_PRIV __copy_ptrs(__first, __last, __result,
276  _UseTrivialCopy(_STLP_VALUE_TYPE(__first, _InputIter),
277  _STLP_VALUE_TYPE(__result, _OutputIter))._Answer());
278 }
#define _STLP_VALUE_TYPE(_It, _Tp)
#define _STLP_PRIV
Definition: _dm.h:70
_TrivialCopy< _Src, _Dst > _UseTrivialCopy(_Src *, _Dst *)
Definition: type_traits.h:501
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
_OutputIter __copy_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type &)
Definition: _algobase.h:260
template<class _InputIter , class _OutputIter >
_OutputIter __copy_aux ( _InputIter  __first,
_InputIter  __last,
_OutputIter  __result,
const __false_type  
)
inline

Definition at line 281 of file _algobase.h.

282  {
283  return _STLP_PRIV __copy(__first, __last, __result,
284  _STLP_ITERATOR_CATEGORY(__first, _InputIter),
285  _STLP_DISTANCE_TYPE(__first, _InputIter));
286 }
#define _STLP_ITERATOR_CATEGORY(_It, _Tp)
_STLP_MOVE_TO_PRIV_NAMESPACE _OutputIter __copy(_InputIter __first, _InputIter __last, _OutputIter __result, const input_iterator_tag &, _Distance *)
Definition: _algobase.h:184
#define _STLP_PRIV
Definition: _dm.h:70
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
#define _STLP_DISTANCE_TYPE(_It, _Tp)
template<class _BidirectionalIter1 , class _BidirectionalIter2 , class _Distance >
_BidirectionalIter2 __copy_backward ( _BidirectionalIter1  __first,
_BidirectionalIter1  __last,
_BidirectionalIter2  __result,
const bidirectional_iterator_tag ,
_Distance *   
)
inline

Definition at line 232 of file _algobase.h.

Referenced by __copy_backward_aux(), __copy_backward_ptrs(), __BVECTOR_QUALIFIED::_M_fill_insert(), __BVECTOR_QUALIFIED::_M_insert_aux(), and __BVECTOR_QUALIFIED::insert().

236  {
237  while (__first != __last)
238  *--__result = *--__last;
239  return __result;
240 }
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
template<class _RandomAccessIter , class _BidirectionalIter , class _Distance >
_BidirectionalIter __copy_backward ( _RandomAccessIter  __first,
_RandomAccessIter  __last,
_BidirectionalIter  __result,
const random_access_iterator_tag ,
_Distance *   
)
inline

Definition at line 243 of file _algobase.h.

247  {
248  for (_Distance __n = __last - __first; __n > 0; --__n)
249  *--__result = *--__last;
250  return __result;
251 }
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
return __n
Definition: _algobase.h:662
template<class _InputIter , class _OutputIter >
_OutputIter __copy_backward_aux ( _InputIter  __first,
_InputIter  __last,
_OutputIter  __result,
const __false_type  
)
inline

Definition at line 312 of file _algobase.h.

Referenced by copy_backward().

312  {
313  return _STLP_PRIV __copy_backward(__first, __last, __result,
314  _STLP_ITERATOR_CATEGORY(__first,_InputIter),
315  _STLP_DISTANCE_TYPE(__first, _InputIter));
316 }
_BidirectionalIter2 __copy_backward(_BidirectionalIter1 __first, _BidirectionalIter1 __last, _BidirectionalIter2 __result, const bidirectional_iterator_tag &, _Distance *)
Definition: _algobase.h:232
#define _STLP_ITERATOR_CATEGORY(_It, _Tp)
#define _STLP_PRIV
Definition: _dm.h:70
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
#define _STLP_DISTANCE_TYPE(_It, _Tp)
template<class _InputIter , class _OutputIter >
_OutputIter __copy_backward_aux ( _InputIter  __first,
_InputIter  __last,
_OutputIter  __result,
const __true_type  
)
inline

Definition at line 319 of file _algobase.h.

319  {
320  return _STLP_PRIV __copy_backward_ptrs(__first, __last, __result,
321  _UseTrivialCopy(_STLP_VALUE_TYPE(__first, _InputIter),
322  _STLP_VALUE_TYPE(__result, _OutputIter))._Answer());
323 }
_STLP_MOVE_TO_PRIV_NAMESPACE _OutputIter __copy_backward_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type &)
Definition: _algobase.h:299
#define _STLP_VALUE_TYPE(_It, _Tp)
#define _STLP_PRIV
Definition: _dm.h:70
_TrivialCopy< _Src, _Dst > _UseTrivialCopy(_Src *, _Dst *)
Definition: type_traits.h:501
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
template<class _InputIter , class _OutputIter >
_STLP_MOVE_TO_PRIV_NAMESPACE _OutputIter __copy_backward_ptrs ( _InputIter  __first,
_InputIter  __last,
_OutputIter  __result,
const __false_type  
)
inline

Definition at line 299 of file _algobase.h.

Referenced by __copy_backward_aux(), vector< _Tp, >::_M_fill_insert_aux(), and vector< CTestInfo >::_M_range_insert_aux().

300  {
301  return _STLP_PRIV __copy_backward(__first, __last, __result,
302  _STLP_ITERATOR_CATEGORY(__first, _InputIter),
303  _STLP_DISTANCE_TYPE(__first, _InputIter));
304 }
_BidirectionalIter2 __copy_backward(_BidirectionalIter1 __first, _BidirectionalIter1 __last, _BidirectionalIter2 __result, const bidirectional_iterator_tag &, _Distance *)
Definition: _algobase.h:232
#define _STLP_ITERATOR_CATEGORY(_It, _Tp)
#define _STLP_PRIV
Definition: _dm.h:70
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
#define _STLP_DISTANCE_TYPE(_It, _Tp)
template<class _InputIter , class _OutputIter >
_OutputIter __copy_backward_ptrs ( _InputIter  __first,
_InputIter  __last,
_OutputIter  __result,
const __true_type  
)
inline

Definition at line 306 of file _algobase.h.

307  {
308  return (_OutputIter)_STLP_PRIV __copy_trivial_backward(__first, __last, __result);
309 }
#define _STLP_PRIV
Definition: _dm.h:70
void * __copy_trivial_backward(const void *__first, const void *__last, void *__result)
Definition: _algobase.h:254
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
template<class _InputIter , class _Size , class _OutputIter >
_STLP_MOVE_TO_PRIV_NAMESPACE _STLP_INLINE_LOOP _STLP_STD::pair<_InputIter, _OutputIter> __copy_n ( _InputIter  __first,
_Size  __count,
_OutputIter  __result,
const input_iterator_tag  
)

Definition at line 377 of file _algobase.h.

Referenced by copy_n().

378  {
379  for ( ; __count > 0; --__count) {
380  *__result = *__first;
381  ++__first;
382  ++__result;
383  }
384  return _STLP_STD::pair<_InputIter, _OutputIter>(__first, __result);
385 }
template<class _RAIter , class _Size , class _OutputIter >
_STLP_STD::pair<_RAIter, _OutputIter> __copy_n ( _RAIter  __first,
_Size  __count,
_OutputIter  __result,
const random_access_iterator_tag  
)
inline

Definition at line 389 of file _algobase.h.

390  {
391  _RAIter __last = __first + __count;
392  return _STLP_STD::pair<_RAIter, _OutputIter>(__last, _STLP_STD::copy(__first, __last, __result));
393 }
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
_STLP_MOVE_TO_STD_NAMESPACE _OutputIter copy(_InputIter __first, _InputIter __last, _OutputIter __result)
Definition: _algobase.h:291
template<class _InputIter , class _OutputIter >
_OutputIter __copy_ptrs ( _InputIter  __first,
_InputIter  __last,
_OutputIter  __result,
const __false_type  
)
inline

Definition at line 260 of file _algobase.h.

Referenced by __copy_aux(), vector< CTestInfo >::_M_erase(), and vector< _Tp, >::operator=().

261  {
262  return _STLP_PRIV __copy(__first, __last, __result, random_access_iterator_tag(), (ptrdiff_t*)0);
263 }
#define random_access_iterator_tag
Definition: _abbrevs.h:28
_STLP_MOVE_TO_PRIV_NAMESPACE _OutputIter __copy(_InputIter __first, _InputIter __last, _OutputIter __result, const input_iterator_tag &, _Distance *)
Definition: _algobase.h:184
#define _STLP_PRIV
Definition: _dm.h:70
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
__kernel_ptrdiff_t ptrdiff_t
Definition: linux.h:247
template<class _InputIter , class _OutputIter >
_OutputIter __copy_ptrs ( _InputIter  __first,
_InputIter  __last,
_OutputIter  __result,
const __true_type  
)
inline

Definition at line 265 of file _algobase.h.

266  {
267  // we know they all pointers, so this cast is OK
268  // return (_OutputIter)__copy_trivial(&(*__first), &(*__last), &(*__result));
269  return (_OutputIter)_STLP_PRIV __copy_trivial(__first, __last, __result);
270 }
#define _STLP_PRIV
Definition: _dm.h:70
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
void * __copy_trivial(const void *__first, const void *__last, void *__result)
Definition: _algobase.h:222
void* __copy_trivial ( const void __first,
const void __last,
void __result 
)
inline

Definition at line 222 of file _algobase.h.

Referenced by __copy_ptrs(), and vector< _Tp, >::_M_insert_overflow().

222  {
223  size_t __n = (const char*)__last - (const char*)__first;
224  return __n ? (void *)((char*)memmove(__result, __first, __n) + __n) : __result;
225 }
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
return __n
Definition: _algobase.h:662
void* __copy_trivial_backward ( const void __first,
const void __last,
void __result 
)
inline

Definition at line 254 of file _algobase.h.

Referenced by __copy_backward_ptrs().

254  {
255  const ptrdiff_t _Num = (const char*)__last - (const char*)__first;
256  return (_Num > 0) ? memmove((char*)__result - _Num, __first, _Num) : __result ;
257 }
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
__kernel_ptrdiff_t ptrdiff_t
Definition: linux.h:247
template<class _ForwardIter , class _Tp , class _Distance >
void __fill ( _ForwardIter  __first,
_ForwardIter  __last,
const _Tp &  __val,
const input_iterator_tag ,
_Distance *   
)
inline

Definition at line 417 of file _algobase.h.

Referenced by __put_float(), __put_integer(), _S_sort(), _Slist_sort(), basic_ios< char, _Traits >::fill(), and fill().

418  {
419  _STLP_PRIV __fill_fwd(__first, __last, __val);
420 }
_STLP_INLINE_LOOP _InputIter const _Tp & __val
Definition: _algobase.h:656
#define _STLP_PRIV
Definition: _dm.h:70
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
_STLP_MOVE_TO_PRIV_NAMESPACE _STLP_INLINE_LOOP void __fill_fwd(_ForwardIter __first, _ForwardIter __last, const _Tp &__val)
Definition: _algobase.h:411
template<class _RandomAccessIter , class _Tp , class _Distance >
_STLP_INLINE_LOOP void __fill ( _RandomAccessIter  __first,
_RandomAccessIter  __last,
const _Tp &  __val,
const random_access_iterator_tag ,
_Distance *   
)

Definition at line 440 of file _algobase.h.

441  {
442  for (_Distance __n = __last - __first ; __n > 0; ++__first, --__n)
443  *__first = __val;
444 }
_STLP_INLINE_LOOP _InputIter const _Tp & __val
Definition: _algobase.h:656
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
return __n
Definition: _algobase.h:662
template<class _ForwardIter , class _Tp >
_STLP_MOVE_TO_PRIV_NAMESPACE _STLP_INLINE_LOOP void __fill_fwd ( _ForwardIter  __first,
_ForwardIter  __last,
const _Tp &  __val 
)

Definition at line 411 of file _algobase.h.

Referenced by __fill().

411  {
412  for ( ; __first != __last; ++__first)
413  *__first = __val;
414 }
_STLP_INLINE_LOOP _InputIter const _Tp & __val
Definition: _algobase.h:656
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
template<class _OutputIter , class _Size , class _Tp >
_STLP_MOVE_TO_PRIV_NAMESPACE _STLP_INLINE_LOOP _OutputIter __fill_n ( _OutputIter  __first,
_Size  __n,
const _Tp &  __val 
)

Definition at line 478 of file _algobase.h.

Referenced by __copy_float_and_fill(), __copy_integer_and_fill(), __do_put_bool(), __money_do_put(), vector< _Tp, >::_M_fill_assign(), vector< _Tp, >::_M_insert_overflow(), and fill_n().

478  {
479  _STLP_FIX_LITERAL_BUG(__first)
480  for ( ; __n > 0; --__n, ++__first)
481  *__first = __val;
482  return __first;
483 }
return(0)
_STLP_INLINE_LOOP _InputIter const _Tp & __val
Definition: _algobase.h:656
#define _STLP_FIX_LITERAL_BUG(__x)
Definition: features.h:301
for(;__first!=__last;++__first) if(*__first
Definition: _algo.h:71
return __n
Definition: _algobase.h:662
template<class _InputIter , class _ForwardIter >
_STLP_MOVE_TO_PRIV_NAMESPACE _InputIter __find_first_of ( _InputIter  __first1,
_InputIter  __last1,
_ForwardIter  __first2,
_ForwardIter  __last2 
)
inline

Definition at line 339 of file _algobase.c.

Referenced by __find_first_of_aux2(), __str_find_first_of_aux(), and find_first_of().

340  {
341  return _STLP_PRIV __find_first_of_aux1(__first1, __last1, __first2, __last2,
342  _STLP_VALUE_TYPE(__first1, _InputIter),
343  _STLP_VALUE_TYPE(__first2, _ForwardIter));
344 }
_InputIter __find_first_of_aux1(_InputIter __first1, _InputIter __last1, _ForwardIter __first2, _ForwardIter __last2, _Tp1 *__pt1, _Tp2 *__pt2)
Definition: _algobase.c:327
#define _STLP_VALUE_TYPE(_It, _Tp)
#define _STLP_PRIV
Definition: _dm.h:70
template<class _InputIter , class _ForwardIter , class _BinaryPredicate >
_InputIter __find_first_of ( _InputIter  __first1,
_InputIter  __last1,
_ForwardIter  __first2,
_ForwardIter  __last2,
_BinaryPredicate  __comp 
)

Definition at line 348 of file _algobase.c.

350  {
351  for ( ; __first1 != __last1; ++__first1) {
352  for (_ForwardIter __iter = __first2; __iter != __last2; ++__iter) {
353  if (__comp(*__first1, *__iter)) {
354  return __first1;
355  }
356  }
357  }
358  return __last1;
359 }
template<class _ForwardIter1 , class _ForwardIter2 >
void __iter_swap_aux ( _ForwardIter1 &  __i1,
_ForwardIter2 &  __i2,
const __true_type  
)
inline

Definition at line 107 of file _algobase.h.

Referenced by iter_swap().

107  {
108  /* namespace specification breaks access to the right swap template overload (at least for gcc) */
109  /*_STLP_STD::*/ swap(*__i1, *__i2);
110 }
_STLP_BEGIN_NAMESPACE void swap(_Tp &__a, _Tp &__b)
Definition: _algobase.h:81
template<class _ForwardIter1 , class _ForwardIter2 >
void __iter_swap_aux ( _ForwardIter1 &  __i1,
_ForwardIter2 &  __i2,
const __false_type  
)
inline

Definition at line 113 of file _algobase.h.

113  {
114  _STLP_PRIV __iter_swap_aux_aux( __i1, __i2, _STLP_VALUE_TYPE(__i1,_ForwardIter1) );
115 }
_STLP_MOVE_TO_PRIV_NAMESPACE void __iter_swap_aux_aux(_ForwardIter1 &__i1, _ForwardIter2 &__i2, _Value *)
Definition: _algobase.h:100
#define _STLP_VALUE_TYPE(_It, _Tp)
#define _STLP_PRIV
Definition: _dm.h:70
template<class _ForwardIter1 , class _ForwardIter2 , class _Value >
_STLP_MOVE_TO_PRIV_NAMESPACE void __iter_swap_aux_aux ( _ForwardIter1 &  __i1,
_ForwardIter2 &  __i2,
_Value  
)
inline

Definition at line 100 of file _algobase.h.

Referenced by __iter_swap_aux().

100  {
101  _Value tmp = *__i1;
102  *__i1 = *__i2;
103  *__i2 = tmp;
104 }
int _Value
Definition: setjmp.h:188
template<class _InputIter1 , class _InputIter2 >
_STLP_MOVE_TO_PRIV_NAMESPACE int __lexicographical_compare_3way ( _InputIter1  __first1,
_InputIter1  __last1,
_InputIter2  __first2,
_InputIter2  __last2 
)

Definition at line 78 of file _algobase.c.

Referenced by rope< _CharT, _Alloc >::_S_compare(), collate< char >::do_compare(), collate< wchar_t >::do_compare(), and lexicographical_compare_3way().

79  {
80  while (__first1 != __last1 && __first2 != __last2) {
81  if (*__first1 < *__first2) {
82  _STLP_VERBOSE_ASSERT(!(*__first2 < *__first1), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
83  return -1;
84  }
85  if (*__first2 < *__first1)
86  return 1;
87  ++__first1;
88  ++__first2;
89  }
90  if (__first2 == __last2) {
91  return !(__first1 == __last1);
92  }
93  else {
94  return -1;
95  }
96 }
return(0)
if(!(yy_init))
Definition: macro.lex.yy.c:704
#define _STLP_VERBOSE_ASSERT(expr, diagnostic)
Definition: _debug.h:439
int __lexicographical_compare_3way ( const unsigned char __first1,
const unsigned char __last1,
const unsigned char __first2,
const unsigned char __last2 
)
inline

Definition at line 621 of file _algobase.h.

624  {
625  const ptrdiff_t __len1 = __last1 - __first1;
626  const ptrdiff_t __len2 = __last2 - __first2;
627  const int __result = memcmp(__first1, __first2, (min) (__len1, __len2));
628  return __result != 0 ? __result
629  : (__len1 == __len2 ? 0 : (__len1 < __len2 ? -1 : 1));
630 }
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
__kernel_ptrdiff_t ptrdiff_t
Definition: linux.h:247
const _Tp &() min(const _Tp &__a, const _Tp &__b)
Definition: _algobase.h:139
template<class _ForwardIter , class _Tp , class _Compare1 , class _Compare2 , class _Distance >
_STLP_MOVE_TO_PRIV_NAMESPACE _ForwardIter __lower_bound ( _ForwardIter  __first,
_ForwardIter  __last,
const _Tp &  __val,
_Compare1  __comp1,
_Compare2  __comp2,
_Distance *   
)

Definition at line 453 of file _algobase.c.

Referenced by __equal_range(), binary_search(), and lower_bound().

454  {
455  _Distance __len = _STLP_STD::distance(__first, __last);
456  _Distance __half;
457  _ForwardIter __middle;
458 
459  while (__len > 0) {
460  __half = __len >> 1;
461  __middle = __first;
462  _STLP_STD::advance(__middle, __half);
463  if (__comp1(*__middle, __val)) {
464  _STLP_VERBOSE_ASSERT(!__comp2(__val, *__middle), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
465  __first = __middle;
466  ++__first;
467  __len = __len - __half - 1;
468  }
469  else
470  __len = __half;
471  }
472  return __first;
473 }
GLsizei GLsizei GLfloat distance
Definition: glext.h:11755
return(0)
_STLP_INLINE_LOOP _InputIter __last
Definition: _algo.h:68
_STLP_INLINE_LOOP _InputIter const _Tp & __val
Definition: _algobase.h:656
_STLP_MOVE_TO_STD_NAMESPACE void _STLP_CALL advance(_InputIterator &__i, _Distance __n)
else
Definition: s_aatritemp.h:84
#define _STLP_VERBOSE_ASSERT(expr, diagnostic)
Definition: _debug.h:439
template<class _InputIter , class _Tp >
_STLP_INLINE_LOOP _STLP_DIFFERENCE_TYPE ( _InputIter  )
template<class _InputIter , class _OutputIter >
_STLP_MOVE_TO_STD_NAMESPACE _OutputIter copy ( _InputIter  __first,
_InputIter  __last,
_OutputIter  __result 
)
inline

Definition at line 291 of file _algobase.h.

Referenced by __copy_n().

291  {
292  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
293  return _STLP_PRIV __copy_aux(__first, __last, __result, _BothPtrType< _InputIter, _OutputIter>::_Answer());
294 }
return(0)
#define _STLP_PRIV
Definition: _dm.h:70
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
_OutputIter __copy_aux(_InputIter __first, _InputIter __last, _OutputIter __result, const __true_type &)
Definition: _algobase.h:273
template<class _InputIter , class _OutputIter >
_STLP_MOVE_TO_STD_NAMESPACE _OutputIter copy_backward ( _InputIter  __first,
_InputIter  __last,
_OutputIter  __result 
)
inline

Definition at line 328 of file _algobase.h.

Referenced by __insert_grouping_aux(), __linear_insert(), __merge_backward(), __rotate_adaptive(), deque< _Tp, >::_M_erase(), deque< _Tp, >::_M_fill_insert_aux(), deque< _Tp, >::_M_insert_range_aux(), deque< _Tp, >::_M_reallocate_map(), CopyTest::copy_back(), and CopyTest::copy_back_array().

328  {
329  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
330  return _STLP_PRIV __copy_backward_aux(__first, __last, __result, _BothPtrType< _InputIter, _OutputIter>::_Answer() );
331 }
return(0)
_OutputIter __copy_backward_aux(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type &)
Definition: _algobase.h:312
#define _STLP_PRIV
Definition: _dm.h:70
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
template<class _InputIter , class _Size , class _OutputIter >
_STLP_MOVE_TO_STD_NAMESPACE pair<_InputIter, _OutputIter> copy_n ( _InputIter  __first,
_Size  __count,
_OutputIter  __result 
)
inline

Definition at line 399 of file _algobase.h.

Referenced by IStreamIteratorTest::copy_n_test().

399  {
400  _STLP_FIX_LITERAL_BUG(__first)
401  return _STLP_PRIV __copy_n(__first, __count, __result, _STLP_ITERATOR_CATEGORY(__first, _InputIter));
402 }
_STLP_MOVE_TO_PRIV_NAMESPACE _STLP_INLINE_LOOP _STLP_STD::pair< _InputIter, _OutputIter > __copy_n(_InputIter __first, _Size __count, _OutputIter __result, const input_iterator_tag &)
Definition: _algobase.h:377
#define _STLP_ITERATOR_CATEGORY(_It, _Tp)
return(0)
#define _STLP_PRIV
Definition: _dm.h:70
#define _STLP_FIX_LITERAL_BUG(__x)
Definition: features.h:301
template<class _InputIter1 , class _InputIter2 >
_STLP_INLINE_LOOP bool equal ( _InputIter1  __first1,
_InputIter1  __last1,
_InputIter2  __first2 
)

Definition at line 551 of file _algobase.h.

552  {
554  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
555  for ( ; __first1 != __last1; ++__first1, ++__first2)
556  if (!(*__first1 == *__first2))
557  return false;
558  return true;
559 }
return(0)
if(!(yy_init))
Definition: macro.lex.yy.c:704
#define false
Definition: stdbool.h:38
#define _STLP_PRIV
Definition: _dm.h:70
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
#define _STLP_FIX_LITERAL_BUG(__x)
Definition: features.h:301
#define true
Definition: stdbool.h:37
for(;__first!=__last;++__first) if(*__first
Definition: _algo.h:71
template<class _InputIter1 , class _InputIter2 , class _BinaryPredicate >
_STLP_INLINE_LOOP bool equal ( _InputIter1  __first1,
_InputIter1  __last1,
_InputIter2  __first2,
_BinaryPredicate  __binary_pred 
)

Definition at line 563 of file _algobase.h.

564  {
565  _STLP_FIX_LITERAL_BUG(__first2)
566  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
567  for ( ; __first1 != __last1; ++__first1, ++__first2)
568  if (!__binary_pred(*__first1, *__first2))
569  return false;
570  return true;
571 }
return(0)
if(!(yy_init))
Definition: macro.lex.yy.c:704
#define false
Definition: stdbool.h:38
#define _STLP_PRIV
Definition: _dm.h:70
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
#define _STLP_FIX_LITERAL_BUG(__x)
Definition: features.h:301
#define true
Definition: stdbool.h:37
for(;__first!=__last;++__first) if(*__first
Definition: _algo.h:71
template<class _ForwardIter , class _Tp >
_STLP_MOVE_TO_STD_NAMESPACE void fill ( _ForwardIter  __first,
_ForwardIter  __last,
const _Tp &  __val 
)
inline

Definition at line 449 of file _algobase.h.

Referenced by __BVECTOR_QUALIFIED::__BVECTOR(), hashtable< _Val, _Key, _HF, _Traits, _ExK, _EqK, _All >::_M_copy_from(), _Base_bitset< _Nw >::_M_do_left_shift(), _Base_bitset< _Nw >::_M_do_right_shift(), vector< _Tp, >::_M_fill_assign(), deque< IncompleteClass >::_M_fill_assign(), __BVECTOR_QUALIFIED::_M_fill_assign(), __BVECTOR_QUALIFIED::_M_fill_insert(), vector< _Tp, >::_M_fill_insert_aux(), deque< _Tp, >::_M_fill_insert_aux(), hashtable< _Val, _Key, _HF, _Traits, _ExK, _EqK, _All >::_M_insert_noresize(), hashtable< _Val, _Key, _HF, _Traits, _ExK, _EqK, _All >::_M_rehash(), _Stl_expand_array(), brush_fill_path(), brush_fill_pixels(), create_table(), TConsole::DeleteCharacter(), CardButton::DrawRect(), hashtable< _Val, _Key, _HF, _Traits, _ExK, _EqK, _All >::erase(), fi_set(), FillTest::fill1(), GdipCreatePath(), GdipCreatePath2(), GdipSetPathFillMode(), utf_converter::getBOM(), utf_converter::getByte(), inflate_table(), basic_ios< _CharT, _Traits >::init(), TConsole::InsertCharacter(), TConsole::InsertLine(), make_decode_table(), mpg123_copy_string(), mpg123_index(), mpg123_set_index(), ui_ellipse(), ui_patblt(), ui_polygon(), and UniqueTest::uniqcpy2().

449  {
450  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
451  _STLP_PRIV __fill(__first, __last, __val,
452  _STLP_ITERATOR_CATEGORY(__first, _ForwardIter),
453  _STLP_DISTANCE_TYPE(__first, _ForwardIter));
454 }
#define _STLP_ITERATOR_CATEGORY(_It, _Tp)
_STLP_INLINE_LOOP _InputIter const _Tp & __val
Definition: _algobase.h:656
#define _STLP_PRIV
Definition: _dm.h:70
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
void __fill(_ForwardIter __first, _ForwardIter __last, const _Tp &__val, const input_iterator_tag &, _Distance *)
Definition: _algobase.h:417
#define _STLP_DISTANCE_TYPE(_It, _Tp)
void fill ( unsigned char __first,
unsigned char __last,
const unsigned char __val 
)
inline

Definition at line 457 of file _algobase.h.

458  {
459  unsigned char __tmp = __val;
460  memset(__first, __tmp, __last - __first);
461 }
_STLP_INLINE_LOOP _InputIter const _Tp & __val
Definition: _algobase.h:656
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
#define memset(x, y, z)
Definition: compat.h:39
void fill ( signed char __first,
signed char __last,
const signed char __val 
)
inline

Definition at line 463 of file _algobase.h.

464  {
465  signed char __tmp = __val;
466  memset(__first, __STATIC_CAST(unsigned char,__tmp), __last - __first);
467 }
#define __STATIC_CAST(__x, __y)
Definition: features.h:585
_STLP_INLINE_LOOP _InputIter const _Tp & __val
Definition: _algobase.h:656
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
#define memset(x, y, z)
Definition: compat.h:39
void fill ( char __first,
char __last,
const char __val 
)
inline

Definition at line 469 of file _algobase.h.

469  {
470  char __tmp = __val;
471  memset(__first, __STATIC_CAST(unsigned char,__tmp), __last - __first);
472 }
#define __STATIC_CAST(__x, __y)
Definition: features.h:585
_STLP_INLINE_LOOP _InputIter const _Tp & __val
Definition: _algobase.h:656
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
#define memset(x, y, z)
Definition: compat.h:39
template<class _OutputIter , class _Size , class _Tp >
_STLP_MOVE_TO_STD_NAMESPACE void fill_n ( _OutputIter  __first,
_Size  __n,
const _Tp &  __val 
)
inline

Definition at line 511 of file _algobase.h.

Referenced by __BVECTOR_QUALIFIED::_M_fill_insert(), assert_sorted_version(), FillTest::filln1(), test_stable_partition::operator()(), and valarray< bool >::operator=().

511  {
512  _STLP_FIX_LITERAL_BUG(__first)
513  _STLP_PRIV __fill_n(__first, __n, __val);
514 }
_STLP_MOVE_TO_PRIV_NAMESPACE _STLP_INLINE_LOOP _OutputIter __fill_n(_OutputIter __first, _Size __n, const _Tp &__val)
Definition: _algobase.h:478
_STLP_INLINE_LOOP _InputIter const _Tp & __val
Definition: _algobase.h:656
#define _STLP_PRIV
Definition: _dm.h:70
#define _STLP_FIX_LITERAL_BUG(__x)
Definition: features.h:301
return __n
Definition: _algobase.h:662
template<class _InputIter , class _Tp >
_InputIter find ( _InputIter  __first,
_InputIter  __last,
const _Tp &  __val 
)

Definition at line 221 of file _algobase.c.

Referenced by __get_fdigit(), CertFindCertificateInStore(), compare_FindGlyph(), EnumColorProfilesA(), EnumColorProfilesW(), expect_files(), TArrayAsVector< KeyMap >::Find(), FindTest::find0(), FindTest::find1(), FindTest::find_char(), FindTest::findif0(), FTPFINDNEXT_FindNextFileW(), XMLStorage::XMLNode::AttributeMap::get(), anonymous_namespace{mstscax.cpp}::init(), main(), on_mime_message_available(), FileTypeManager::operator[](), XMLStorage::XMLReaderBase::parse(), remove(), search(), search_n(), TcpipAddIpDlg(), TcpipAdvGwDlg(), TcpipFilterPortDlg(), test__lcreat(), test_GetAbsolutePathName(), TestMessageHandler(), and VerifyInsertion().

221  {
222  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
223  return _STLP_PRIV __find(__first, __last, __val, _STLP_ITERATOR_CATEGORY(__first, _InputIter));
224 }
#define _STLP_ITERATOR_CATEGORY(_It, _Tp)
_STLP_MOVE_TO_PRIV_NAMESPACE _STLP_INLINE_LOOP _RandomAccessIter __find(_RandomAccessIter __first, _RandomAccessIter __last, const _Tp &__val, const random_access_iterator_tag &)
Definition: _algobase.c:112
return(0)
_STLP_INLINE_LOOP _InputIter __last
Definition: _algo.h:68
_STLP_INLINE_LOOP _InputIter const _Tp & __val
Definition: _algobase.h:656
#define _STLP_PRIV
Definition: _dm.h:70
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
template<class _ForwardIter1 , class _ForwardIter2 , class _BinaryPredicate >
_STLP_MOVE_TO_STD_NAMESPACE _ForwardIter1 find_end ( _ForwardIter1  __first1,
_ForwardIter1  __last1,
_ForwardIter2  __first2,
_ForwardIter2  __last2,
_BinaryPredicate  __comp 
)

Definition at line 434 of file _algobase.c.

436  {
437  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
438  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
439  return _STLP_PRIV __find_end(__first1, __last1, __first2, __last2,
440 #if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
441  _STLP_ITERATOR_CATEGORY(__first1, _ForwardIter1),
442  _STLP_ITERATOR_CATEGORY(__first2, _ForwardIter2),
443 #else
446 #endif
447  __comp);
448 }
_ForwardIter1 __find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, _ForwardIter2 __first2, _ForwardIter2 __last2, const forward_iterator_tag &, const forward_iterator_tag &, _BinaryPredicate __comp)
Definition: _algobase.c:369
#define _STLP_ITERATOR_CATEGORY(_It, _Tp)
return(0)
#define _STLP_PRIV
Definition: _dm.h:70
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
template<class _InputIter , class _Predicate >
_InputIter find_if ( _InputIter  __first,
_InputIter  __last,
_Predicate  __pred 
)

Definition at line 214 of file _algobase.c.

Referenced by __str_find_first_not_of_aux1(), __str_find_first_not_of_aux3(), __write_floatT(), BcomposTest::bcompos1(), BcomposTest::bcompos2(), ctype_byname< wchar_t >::do_scan_is(), ctype_byname< wchar_t >::do_scan_not(), MemFunPtrTest::find(), basic_string< _CharT, _Traits, _Alloc >::find(), basic_string< _CharT, _Traits, _Alloc >::find_first_not_of(), basic_string< _CharT, _Traits, _Alloc >::find_last_not_of(), FindTest::findif0(), FindTest::findif1(), _Not_within_traits< _Traits >::operator()(), _Scan_wspace_null< _Traits >::operator()(), _Scan_for_char_val< _Traits >::operator()(), _Scan_for_int_val< _Traits >::operator()(), Ptr2Test::ptrun1(), Ptr2Test::ptrun2(), remove_if(), basic_string< _CharT, _Traits, _Alloc >::rfind(), UnaryTest::unegate1(), UnaryTest::unegate2(), and UnaryTest::unegate3().

215  {
216  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
217  return _STLP_PRIV __find_if(__first, __last, __pred, _STLP_ITERATOR_CATEGORY(__first, _InputIter));
218 }
_STLP_INLINE_LOOP _InputIter _Predicate __pred
Definition: _algo.h:68
#define _STLP_ITERATOR_CATEGORY(_It, _Tp)
return(0)
_STLP_INLINE_LOOP _InputIter __last
Definition: _algo.h:68
#define _STLP_PRIV
Definition: _dm.h:70
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
_STLP_INLINE_LOOP _RandomAccessIter __find_if(_RandomAccessIter __first, _RandomAccessIter __last, _Predicate __pred, const random_access_iterator_tag &)
Definition: _algobase.c:159
for ( ;__first!  = __last;++__first)

Definition at line 71 of file _algo.h.

71  {
72  if (__pred(*__first))
73  ++__n;
74  }
return __n
Definition: _algo.h:75
_STLP_INLINE_LOOP _InputIter _Predicate __pred
Definition: _algo.h:68
template<class _ForwardIter1 , class _ForwardIter2 >
_STLP_MOVE_TO_STD_NAMESPACE void iter_swap ( _ForwardIter1  __i1,
_ForwardIter2  __i2 
)
inline

Definition at line 120 of file _algobase.h.

Referenced by __merge_without_buffer(), __next_permutation(), __partition(), __prev_permutation(), __reverse(), __unguarded_partition(), IterTest::iterswp0(), IterTest::iterswp1(), IterTest::iterswp2(), IterTest::iterswp3(), random_shuffle(), and swap_ranges().

120  {
121  _STLP_PRIV __iter_swap_aux( __i1, __i2, _IsOKToSwap(_STLP_VALUE_TYPE(__i1, _ForwardIter1), _STLP_VALUE_TYPE(__i2, _ForwardIter2),
122  _STLP_IS_REF_TYPE_REAL_REF(__i1, _ForwardIter1),
123  _STLP_IS_REF_TYPE_REAL_REF(__i2, _ForwardIter2))._Answer());
124 }
_OKToSwap< _Tp1, _Tp2, _IsRef1, _IsRef2 > _IsOKToSwap(_Tp1 *, _Tp2 *, const _IsRef1 &, const _IsRef2 &)
Definition: type_traits.h:497
#define _STLP_IS_REF_TYPE_REAL_REF(_It, _Tp)
#define _STLP_VALUE_TYPE(_It, _Tp)
#define _STLP_PRIV
Definition: _dm.h:70
void __iter_swap_aux(_ForwardIter1 &__i1, _ForwardIter2 &__i2, const __true_type &)
Definition: _algobase.h:107
template<class _InputIter1 , class _InputIter2 >
bool lexicographical_compare ( _InputIter1  __first1,
_InputIter1  __last1,
_InputIter2  __first2,
_InputIter2  __last2 
)

Definition at line 39 of file _algobase.c.

Referenced by LexcmpTest::lexcmp1(), LexcmpTest::lexcmp2(), and operator<().

40  {
41  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
42  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
43  for ( ; __first1 != __last1 && __first2 != __last2
44  ; ++__first1, ++__first2) {
45  if (*__first1 < *__first2) {
46  _STLP_VERBOSE_ASSERT(!(*__first2 < *__first1), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
47  return true;
48  }
49  if (*__first2 < *__first1)
50  return false;
51  }
52  return __first1 == __last1 && __first2 != __last2;
53 }
return(0)
if(!(yy_init))
Definition: macro.lex.yy.c:704
#define for
Definition: utility.h:88
#define false
Definition: stdbool.h:38
#define _STLP_PRIV
Definition: _dm.h:70
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
#define true
Definition: stdbool.h:37
#define _STLP_VERBOSE_ASSERT(expr, diagnostic)
Definition: _debug.h:439
template<class _InputIter1 , class _InputIter2 , class _Compare >
bool lexicographical_compare ( _InputIter1  __first1,
_InputIter1  __last1,
_InputIter2  __first2,
_InputIter2  __last2,
_Compare  __comp 
)

Definition at line 56 of file _algobase.c.

58  {
59  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
60  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
61  for ( ; __first1 != __last1 && __first2 != __last2
62  ; ++__first1, ++__first2) {
63  if (__comp(*__first1, *__first2)) {
64  _STLP_VERBOSE_ASSERT(!__comp(*__first2, *__first1),
65  _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
66  return true;
67  }
68  if (__comp(*__first2, *__first1))
69  return false;
70  }
71  return __first1 == __last1 && __first2 != __last2;
72 }
return(0)
if(!(yy_init))
Definition: macro.lex.yy.c:704
#define for
Definition: utility.h:88
#define false
Definition: stdbool.h:38
#define _STLP_PRIV
Definition: _dm.h:70
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
#define true
Definition: stdbool.h:37
#define _STLP_VERBOSE_ASSERT(expr, diagnostic)
Definition: _debug.h:439
bool lexicographical_compare ( const unsigned char __first1,
const unsigned char __last1,
const unsigned char __first2,
const unsigned char __last2 
)
inline

Definition at line 587 of file _algobase.h.

590  {
591  const size_t __len1 = __last1 - __first1;
592  const size_t __len2 = __last2 - __first2;
593  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
594  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
595 
596  const int __result = memcmp(__first1, __first2, (min) (__len1, __len2));
597  return __result != 0 ? (__result < 0) : (__len1 < __len2);
598 }
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
return(0)
#define const
Definition: zconf.h:230
#define _STLP_PRIV
Definition: _dm.h:70
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
const _Tp &() min(const _Tp &__a, const _Tp &__b)
Definition: _algobase.h:139
template<class _InputIter1 , class _InputIter2 >
_STLP_MOVE_TO_STD_NAMESPACE int lexicographical_compare_3way ( _InputIter1  __first1,
_InputIter1  __last1,
_InputIter2  __first2,
_InputIter2  __last2 
)

Definition at line 101 of file _algobase.c.

102  {
103  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
104  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
105  return _STLP_PRIV __lexicographical_compare_3way(__first1, __last1, __first2, __last2);
106 }
return(0)
#define _STLP_PRIV
Definition: _dm.h:70
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
_STLP_MOVE_TO_PRIV_NAMESPACE int __lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2)
Definition: _algobase.c:78
template<class _Tp >
const _Tp&() max ( const _Tp &  __a,
const _Tp &  __b 
)
inline

Definition at line 141 of file _algobase.h.

141 { return __a < __b ? __b : __a; }
template<class _Tp , class _Compare >
const _Tp&() max ( const _Tp &  __a,
const _Tp &  __b,
_Compare  __comp 
)
inline

Definition at line 157 of file _algobase.h.

157  {
158  return __comp(__a, __b) ? __b : __a;
159 }
template<class _Tp >
const _Tp&() min ( const _Tp &  __a,
const _Tp &  __b 
)
inline

Definition at line 139 of file _algobase.h.

Referenced by __lexicographical_compare_3way(), and lexicographical_compare().

139 { return __b < __a ? __b : __a; }
template<class _Tp , class _Compare >
const _Tp&() min ( const _Tp &  __a,
const _Tp &  __b,
_Compare  __comp 
)
inline

Definition at line 152 of file _algobase.h.

152  {
153  return __comp(__b, __a) ? __b : __a;
154 }
template<class _InputIter1 , class _InputIter2 >
_STLP_INLINE_LOOP _STLP_STD::pair<_InputIter1, _InputIter2> mismatch ( _InputIter1  __first1,
_InputIter1  __last1,
_InputIter2  __first2 
)

Definition at line 522 of file _algobase.h.

Referenced by adns__findrr_anychk(), LoadRegTypeLib(), MismatchTest::mismatch0(), MismatchTest::mismatch1(), MismatchTest::mismatch2(), tinyxml2::XMLNode::ParseDeep(), and VerifyInsertion().

524  {
525  _STLP_FIX_LITERAL_BUG(__first2)
526  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
527  while (__first1 != __last1 && *__first1 == *__first2) {
528  ++__first1;
529  ++__first2;
530  }
531  return _STLP_STD::pair<_InputIter1, _InputIter2>(__first1, __first2);
532 }
while(1)
Definition: macro.lex.yy.c:730
#define _STLP_PRIV
Definition: _dm.h:70
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
#define _STLP_FIX_LITERAL_BUG(__x)
Definition: features.h:301
template<class _InputIter1 , class _InputIter2 , class _BinaryPredicate >
_STLP_INLINE_LOOP _STLP_STD::pair<_InputIter1, _InputIter2> mismatch ( _InputIter1  __first1,
_InputIter1  __last1,
_InputIter2  __first2,
_BinaryPredicate  __binary_pred 
)

Definition at line 536 of file _algobase.h.

539  {
540  _STLP_FIX_LITERAL_BUG(__first2)
541  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
542  while (__first1 != __last1 && __binary_pred(*__first1, *__first2)) {
543  ++__first1;
544  ++__first2;
545  }
546  return _STLP_STD::pair<_InputIter1, _InputIter2>(__first1, __first2);
547 }
while(1)
Definition: macro.lex.yy.c:730
#define _STLP_PRIV
Definition: _dm.h:70
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
#define _STLP_FIX_LITERAL_BUG(__x)
Definition: features.h:301
template<class _ForwardIter , class _Tp >
_STLP_INLINE_LOOP void replace ( _ForwardIter  __first,
_ForwardIter  __last,
const _Tp &  __old_value,
const _Tp &  __new_value 
)

Definition at line 701 of file _algobase.h.

702  {
703  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
704  for ( ; __first != __last; ++__first)
705  if (*__first == __old_value)
706  *__first = __new_value;
707 }
if(!(yy_init))
Definition: macro.lex.yy.c:704
#define _STLP_PRIV
Definition: _dm.h:70
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
_STLP_INLINE_LOOP _InputIter __last
Definition: _algobase.h:656
for(;__first!=__last;++__first) if(*__first
Definition: _algo.h:71
template<class _ForwardIter1 , class _ForwardIter2 , class _BinaryPred >
_ForwardIter1 search ( _ForwardIter1  __first1,
_ForwardIter1  __last1,
_ForwardIter2  __first2,
_ForwardIter2  __last2,
_BinaryPred  __predicate 
)

Definition at line 227 of file _algobase.c.

Referenced by __find_end().

229  {
230  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
231  _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
232  // Test for empty ranges
233  if (__first1 == __last1 || __first2 == __last2)
234  return __first1;
235 
236  // Test for a pattern of length 1.
237  _ForwardIter2 __p1(__first2);
238 
239  if ( ++__p1 == __last2 ) {
240  while (__first1 != __last1 && !__pred(*__first1, *__first2)) {
241  ++__first1;
242  }
243  return __first1;
244  }
245 
246  // General case.
247 
248  for ( ; ; ) { // __first1 != __last1 will be checked below
249  while (__first1 != __last1 && !__pred(*__first1, *__first2)) {
250  ++__first1;
251  }
252  if (__first1 == __last1) {
253  return __last1;
254  }
255  _ForwardIter2 __p = __p1;
256  _ForwardIter1 __current = __first1;
257  if (++__current == __last1) return __last1;
258 
259  while (__pred(*__current, *__p)) {
260  if (++__p == __last2)
261  return __first1;
262  if (++__current == __last1)
263  return __last1;
264  }
265  ++__first1;
266  }
267  return __first1;
268 }
_STLP_INLINE_LOOP _InputIter _Predicate __pred
Definition: _algo.h:68
return(0)
if(!(yy_init))
Definition: macro.lex.yy.c:704
#define _STLP_PRIV
Definition: _dm.h:70
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
template<class _Tp >
_STLP_BEGIN_NAMESPACE void swap ( _Tp &  __a,
_Tp &  __b 
)
inline

Definition at line 81 of file _algobase.h.

Referenced by __iter_swap_aux().

81  {
82 #if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
83 # if !defined(__BORLANDC__)
84  typedef typename _SwapImplemented<_Tp>::_Ret _Implemented;
85 # else
86  enum { _Is = _SwapImplemented<_Tp>::_Is };
87  typedef typename __bool2type<_Is>::_Ret _Implemented;
88 # endif
89  _STLP_PRIV __swap_aux(__a, __b, _Implemented());
90 #else
91  _Tp __tmp = __a;
92  __a = __b;
93  __b = __tmp;
94 #endif
95 }
#define _STLP_PRIV
Definition: _dm.h:70

Variable Documentation

_STLP_INLINE_LOOP _InputIter __last

Definition at line 656 of file _algobase.h.

Referenced by __copy(), __copy_backward(), __copy_n(), __fill_fwd(), and replace().

return __n

Definition at line 662 of file _algobase.h.

Referenced by __copy(), __copy_backward(), __copy_trivial(), __fill(), and __fill_n().