Home | History | Annotate | Download | only in stl

Lines Matching refs:__first

59 for_each(_InputIter __first, _InputIter __last, _Function __f) {
60 for ( ; __first != __last; ++__first)
61 __f(*__first);
68 count_if(_InputIter __first, _InputIter __last, _Predicate __pred) {
69 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
71 for ( ; __first != __last; ++__first) {
72 if (__pred(*__first))
82 adjacent_find(_ForwardIter __first, _ForwardIter __last,
84 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
85 if (__first == __last)
87 _ForwardIter __next = __first;
89 if (__binary_pred(*__first, *__next))
90 return __first;
91 __first = __next;
98 adjacent_find(_ForwardIter __first, _ForwardIter __last) {
99 return adjacent_find(__first, __last,
100 _STLP_PRIV __equal_to(_STLP_VALUE_TYPE(__first, _ForwardIter)));
106 count(_InputIter __first, _InputIter __last, const _Tp& __val, _Size& __n) {
107 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
108 for ( ; __first != __last; ++__first)
109 if (*__first == __val)
115 count_if(_InputIter __first, _InputIter __last, _Predicate __pred, _Size& __n) {
116 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
117 for ( ; __first != __last; ++__first)
118 if (__pred(*__first))
129 _ForwardIter search_n(_ForwardIter __first, _ForwardIter __last,
132 _ForwardIter search_n(_ForwardIter __first, _ForwardIter __last,
170 transform(_InputIter __first, _InputIter __last, _OutputIter __result, _UnaryOperation __opr) {
171 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
172 for ( ; __first != __last; ++__first, ++__result)
173 *__result = __opr(*__first);
190 replace_if(_ForwardIter __first, _ForwardIter __last, _Predicate __pred, const _Tp& __new_value) {
191 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
192 for ( ; __first != __last; ++__first)
193 if (__pred(*__first))
194 *__first = __new_value;
199 replace_copy(_InputIter __first, _InputIter __last,_OutputIter __result,
201 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
202 for ( ; __first != __last; ++__first, ++__result)
203 *__result = *__first == __old_value ? __new_value : *__first;
209 replace_copy_if(_Iterator __first, _Iterator __last,
212 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
213 for ( ; __first != __last; ++__first, ++__result)
214 *__result = __pred(*__first) ? __new_value : *__first;
222 generate(_ForwardIter __first, _ForwardIter __last, _Generator __gen) {
223 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
224 for ( ; __first != __last; ++__first)
225 *__first = __gen();
230 generate_n(_OutputIter __first, _Size __n, _Generator __gen) {
231 for ( ; __n > 0; --__n, ++__first)
232 *__first = __gen();
239 remove_copy(_InputIter __first, _InputIter __last,_OutputIter __result, const _Tp& __val) {
240 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
241 for ( ; __first != __last; ++__first) {
242 if (!(*__first == __val)) {
243 *__result = *__first;
252 remove_copy_if(_InputIter __first, _InputIter __last, _OutputIter __result, _Predicate __pred) {
253 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
254 for ( ; __first != __last; ++__first) {
255 if (!__pred(*__first)) {
256 *__result = *__first;
265 remove(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) {
266 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
267 __first = find(__first, __last, __val);
268 if (__first == __last)
269 return __first;
271 _ForwardIter __next = __first;
272 return remove_copy(++__next, __last, __first, __val);
278 remove_if(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) {
279 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
280 __first = find_if(__first, __last, __pred);
281 if ( __first == __last )
282 return __first;
284 _ForwardIter __next = __first;
285 return remove_copy_if(++__next, __last, __first, __pred);
291 _OutputIter unique_copy(_InputIter __first, _InputIter __last, _OutputIter __result);
294 _OutputIter unique_copy(_InputIter __first, _InputIter __last,_OutputIter __result,
298 inline _ForwardIter unique(_ForwardIter __first, _ForwardIter __last) {
299 __first = adjacent_find(__first, __last);
300 return unique_copy(__first, __last, __first);
304 inline _ForwardIter unique(_ForwardIter __first, _ForwardIter __last,
306 __first = adjacent_find(__first, __last, __binary_pred);
307 return unique_copy(__first, __last, __first, __binary_pred);
316 __reverse(_BidirectionalIter __first, _BidirectionalIter __last, const bidirectional_iterator_tag &) {
317 for (; __first != __last && __first != --__last; ++__first)
318 _STLP_STD::iter_swap(__first,__last);
323 __reverse(_RandomAccessIter __first, _RandomAccessIter __last, const random_access_iterator_tag &) {
324 for (; __first < __last; ++__first)
325 _STLP_STD::iter_swap(__first, --__last);
332 reverse(_BidirectionalIter __first, _BidirectionalIter __last) {
333 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
334 _STLP_PRIV __reverse(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _BidirectionalIter));
339 _OutputIter reverse_copy(_BidirectionalIter __first,
342 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
343 while (__first != __last) {
352 void rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last);
355 inline _OutputIter rotate_copy(_ForwardIter __first, _ForwardIter __middle,
357 return _STLP_STD::copy(__first, __middle, copy(__middle, __last, __result));
363 void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last);
366 void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last,
373 _OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last,
378 _OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last,
384 random_sample(_InputIter __first, _InputIter __last,
390 random_sample(_InputIter __first, _InputIter __last,
399 _ForwardIter partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred);
403 stable_partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred);
418 void sort(_RandomAccessIter __first, _RandomAccessIter __last);
420 void sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp);
424 void stable_sort(_RandomAccessIter __first,
428 void stable_sort(_RandomAccessIter __first,
434 void partial_sort(_RandomAccessIter __first, _RandomAccessIter __middle,
438 void partial_sort(_RandomAccessIter __first,_RandomAccessIter __middle,
443 partial_sort_copy(_InputIter __first, _InputIter __last,
448 partial_sort_copy(_InputIter __first, _InputIter __last,
454 void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
458 void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
481 inline _ForwardIter lower_bound(_ForwardIter __first, _ForwardIter __last,
483 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
484 return _STLP_PRIV __lower_bound(__first, __last, __val,
485 _STLP_PRIV __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0),
486 _STLP_PRIV __less2((_Tp*)0, _STLP_VALUE_TYPE(__first, _ForwardIter)),
487 _STLP_DISTANCE_TYPE(__first, _ForwardIter));
491 inline _ForwardIter lower_bound(_ForwardIter __first, _ForwardIter __last,
493 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
494 return _STLP_PRIV __lower_bound(__first, __last, __val, __comp, __comp,
495 _STLP_DISTANCE_TYPE(__first, _ForwardIter));
501 _ForwardIter __upper_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
507 inline _ForwardIter upper_bound(_ForwardIter __first, _ForwardIter __last,
509 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
510 return _STLP_PRIV __upper_bound(__first, __last, __val,
511 _STLP_PRIV __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0),
512 _STLP_PRIV __less2((_Tp*)0, _STLP_VALUE_TYPE(__first, _ForwardIter)),
513 _STLP_DISTANCE_TYPE(__first, _ForwardIter));
517 inline _ForwardIter upper_bound(_ForwardIter __first, _ForwardIter __last,
519 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
520 return _STLP_PRIV __upper_bound(__first, __last, __val, __comp, __comp,
521 _STLP_DISTANCE_TYPE(__first, _ForwardIter));
528 __equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
535 equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) {
536 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
537 return _STLP_PRIV __equal_range(__first, __last, __val,
538 _STLP_PRIV __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0),
539 _STLP_PRIV __less2((_Tp*)0, _STLP_VALUE_TYPE(__first, _ForwardIter)),
540 _STLP_DISTANCE_TYPE(__first, _ForwardIter));
545 equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
547 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
548 return _STLP_PRIV __equal_range(__first, __last, __val, __comp, __comp,
549 _STLP_DISTANCE_TYPE(__first, _ForwardIter));
553 inline bool binary_search(_ForwardIter __first, _ForwardIter __last,
555 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
556 _ForwardIter __i = _STLP_PRIV __lower_bound(__first, __last, __val,
557 _STLP_PRIV __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0),
558 _STLP_PRIV __less2((_Tp*)0, _STLP_VALUE_TYPE(__first, _ForwardIter)),
559 _STLP_DISTANCE_TYPE(__first, _ForwardIter));
564 inline bool binary_search(_ForwardIter __first, _ForwardIter __last,
567 _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
568 _ForwardIter __i = _STLP_PRIV __lower_bound(__first, __last, __val, __comp, __comp,
569 _STLP_DISTANCE_TYPE(__first, _ForwardIter));
591 void inplace_merge(_BidirectionalIter __first,
596 void inplace_merge(_BidirectionalIter __first,
668 _ForwardIter max_element(_ForwardIter __first, _ForwardIter __last);
670 _ForwardIter max_element(_ForwardIter __first, _ForwardIter __last,
674 _ForwardIter min_element(_ForwardIter __first, _ForwardIter __last);
677 _ForwardIter min_element(_ForwardIter __first, _ForwardIter __last,
684 bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last);
687 bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
692 bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last);
696 bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
705 bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last);
708 bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last,
717 bool __is_sorted(_ForwardIter __first, _ForwardIter __last,
722 inline bool is_sorted(_ForwardIter __first, _ForwardIter __last) {
723 return _STLP_PRIV __is_sorted(__first, __last,
724 _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _ForwardIter)));
728 inline bool is_sorted(_ForwardIter __first, _ForwardIter __last,
730 return _STLP_PRIV __is_sorted(__first, __last, __comp);