| /openbsd-src/gnu/gcc/libstdc++-v3/include/bits/ |
| H A D | stl_algo.h | 153 for_each(_InputIterator __first, _InputIterator __last, _Function __f) in for_each() argument 157 __glibcxx_requires_valid_range(__first, __last); in for_each() 158 for ( ; __first != __last; ++__first) in for_each() 159 __f(*__first); in for_each() 170 __find(_InputIterator __first, _InputIterator __last, in __find() argument 173 while (__first != __last && !(*__first == __val)) in __find() 174 ++__first; in __find() 175 return __first; in __find() 185 __find_if(_InputIterator __first, _InputIterator __last, in __find_if() argument 188 while (__first != __last && !__pred(*__first)) in __find_if() [all …]
|
| H A D | stl_heap.h | 72 __is_heap(_RandomAccessIterator __first, _Distance __n) in _GLIBCXX_BEGIN_NAMESPACE() 77 if (__first[__parent] < __first[__child]) in _GLIBCXX_BEGIN_NAMESPACE() 88 __is_heap(_RandomAccessIterator __first, _StrictWeakOrdering __comp, in __is_heap() argument 94 if (__comp(__first[__parent], __first[__child])) in __is_heap() 104 __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) in __is_heap() argument 105 { return std::__is_heap(__first, std::distance(__first, __last)); } in __is_heap() 109 __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, in __is_heap() argument 111 { return std::__is_heap(__first, __comp, std::distance(__first, __last)); } in __is_heap() 117 __push_heap(_RandomAccessIterator __first, in __push_heap() argument 121 while (__holeIndex > __topIndex && *(__first + __parent) < __value) in __push_heap() [all …]
|
| H A D | stl_uninitialized.h | 72 __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last, in _GLIBCXX_BEGIN_NAMESPACE() 75 { return std::copy(__first, __last, __result); } in _GLIBCXX_BEGIN_NAMESPACE() 79 __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last, in __uninitialized_copy_aux() argument 86 for (; __first != __last; ++__first, ++__cur) in __uninitialized_copy_aux() 87 std::_Construct(&*__cur, *__first); in __uninitialized_copy_aux() 108 uninitialized_copy(_InputIterator __first, _InputIterator __last, in uninitialized_copy() argument 113 return std::__uninitialized_copy_aux(__first, __last, __result, in uninitialized_copy() 118 uninitialized_copy(const char* __first, const char* __last, char* __result) in uninitialized_copy() argument 120 std::memmove(__result, __first, __last - __first); in uninitialized_copy() 121 return __result + (__last - __first); in uninitialized_copy() [all …]
|
| H A D | stl_numeric.h | 81 accumulate(_InputIterator __first, _InputIterator __last, _Tp __init) in _GLIBCXX_BEGIN_NAMESPACE() 85 __glibcxx_requires_valid_range(__first, __last); in _GLIBCXX_BEGIN_NAMESPACE() 87 for (; __first != __last; ++__first) in _GLIBCXX_BEGIN_NAMESPACE() 88 __init = __init + *__first; in _GLIBCXX_BEGIN_NAMESPACE() 107 accumulate(_InputIterator __first, _InputIterator __last, _Tp __init, in accumulate() argument 112 __glibcxx_requires_valid_range(__first, __last); in accumulate() 114 for (; __first != __last; ++__first) in accumulate() 115 __init = __binary_op(__init, *__first); in accumulate() 198 partial_sum(_InputIterator __first, _InputIterator __last, in partial_sum() argument 207 __glibcxx_requires_valid_range(__first, __last); in partial_sum() [all …]
|
| H A D | stl_algobase.h | 265 copy(_II __first, _II __last, _OI __result) 267 for (; __first != __last; ++__result, ++__first) 268 *__result = *__first; 278 copy(_II __first, _II __last, _OI __result) 281 for(_Distance __n = __last - __first; __n > 0; --__n) 283 *__result = *__first; 284 ++__first; 296 copy(const _Tp* __first, const _Tp* __last, _Tp* __result) 298 std::memmove(__result, __first, sizeof(_Tp) * (__last - __first)); 299 return __result + (__last - __first); [all …]
|
| /openbsd-src/gnu/lib/libstdc++/libstdc++/include/bits/ |
| H A D | stl_algo.h | 152 for_each(_InputIter __first, _InputIter __last, _Function __f) in for_each() argument 156 for ( ; __first != __last; ++__first) in for_each() 157 __f(*__first); in for_each() 168 find(_InputIter __first, _InputIter __last, in find() argument 172 while (__first != __last && !(*__first == __val)) in find() 173 ++__first; in find() 174 return __first; in find() 184 find_if(_InputIter __first, _InputIter __last, in find_if() argument 188 while (__first != __last && !__pred(*__first)) in find_if() 189 ++__first; in find_if() [all …]
|
| H A D | stl_heap.h | 70 __push_heap(_RandomAccessIterator __first, in __push_heap() argument 74 while (__holeIndex > __topIndex && *(__first + __parent) < __value) { in __push_heap() 75 *(__first + __holeIndex) = *(__first + __parent); in __push_heap() 79 *(__first + __holeIndex) = __value; in __push_heap() 84 push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) in push_heap() argument 96 __push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0), in push_heap() 103 __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, in __push_heap() argument 107 while (__holeIndex > __topIndex && __comp(*(__first + __parent), __value)) { in __push_heap() 108 *(__first + __holeIndex) = *(__first + __parent); in __push_heap() 112 *(__first + __holeIndex) = __value; in __push_heap() [all …]
|
| H A D | stl_algobase.h | 223 __copy(_InputIter __first, _InputIter __last, in __copy() argument 227 for ( ; __first != __last; ++__result, ++__first) in __copy() 228 *__result = *__first; in __copy() 234 __copy(_RandomAccessIter __first, _RandomAccessIter __last, in __copy() argument 240 for (_Distance __n = __last - __first; __n > 0; --__n) { in __copy() 241 *__result = *__first; in __copy() 242 ++__first; in __copy() 250 __copy_trivial(const _Tp* __first, const _Tp* __last, _Tp* __result) in __copy_trivial() argument 252 memmove(__result, __first, sizeof(_Tp) * (__last - __first)); in __copy_trivial() 253 return __result + (__last - __first); in __copy_trivial() [all …]
|
| H A D | stl_numeric.h | 69 accumulate(_InputIterator __first, _InputIterator __last, _Tp __init) in accumulate() argument 74 for ( ; __first != __last; ++__first) in accumulate() 75 __init = __init + *__first; in accumulate() 81 accumulate(_InputIterator __first, _InputIterator __last, _Tp __init, in accumulate() argument 87 for ( ; __first != __last; ++__first) in accumulate() 88 __init = __binary_op(__init, *__first); in accumulate() 125 partial_sum(_InputIterator __first, _InputIterator __last, in partial_sum() argument 134 if (__first == __last) return __result; in partial_sum() 135 *__result = *__first; in partial_sum() 136 _ValueType __value = *__first; in partial_sum() [all …]
|
| H A D | stl_uninitialized.h | 73 __uninitialized_copy_aux(_InputIter __first, _InputIter __last, in __uninitialized_copy_aux() argument 76 { return copy(__first, __last, __result); } in __uninitialized_copy_aux() 80 __uninitialized_copy_aux(_InputIter __first, _InputIter __last, in __uninitialized_copy_aux() argument 86 for ( ; __first != __last; ++__first, ++__cur) in __uninitialized_copy_aux() 87 _Construct(&*__cur, *__first); in __uninitialized_copy_aux() 108 uninitialized_copy(_InputIter __first, _InputIter __last, _ForwardIter __result) in uninitialized_copy() argument 112 return __uninitialized_copy_aux(__first, __last, __result, _Is_POD()); in uninitialized_copy() 116 uninitialized_copy(const char* __first, const char* __last, char* __result) in uninitialized_copy() argument 118 memmove(__result, __first, __last - __first); in uninitialized_copy() 119 return __result + (__last - __first); in uninitialized_copy() [all …]
|
| /openbsd-src/gnu/llvm/libcxx/include/__algorithm/ |
| H A D | search_n.h | 34 pair<_Iter, _Iter> __search_n_forward_impl(_Iter __first, _Sent __last, in __search_n_forward_impl() argument 40 return std::make_pair(__first, __first); in __search_n_forward_impl() 44 if (__first == __last) { // return __last if no element matches __value in __search_n_forward_impl() 45 _IterOps<_AlgPolicy>::__advance_to(__first, __last); in __search_n_forward_impl() 46 return std::make_pair(__first, __first); in __search_n_forward_impl() 48 if (std::__invoke(__pred, std::__invoke(__proj, *__first), __value)) in __search_n_forward_impl() 50 ++__first; in __search_n_forward_impl() 53 _Iter __m = __first; in __search_n_forward_impl() 57 return std::make_pair(__first, ++__m); in __search_n_forward_impl() 59 _IterOps<_AlgPolicy>::__advance_to(__first, __last); in __search_n_forward_impl() [all …]
|
| H A D | rotate.h | 30 __rotate_left(_ForwardIterator __first, _ForwardIterator __last) in __rotate_left() argument 35 value_type __tmp = _Ops::__iter_move(__first); in __rotate_left() 37 _Ops::next(__first), __last, __first).second; in __rotate_left() 44 __rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last) in __rotate_right() argument 51 …_BidirectionalIterator __fp1 = std::__move_backward<_AlgPolicy>(__first, __lm1, std::move(__last))… in __rotate_right() 52 *__first = _VSTD::move(__tmp); in __rotate_right() 58 __rotate_forward(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last) in __rotate_forward() argument 63 _IterOps<_AlgPolicy>::iter_swap(__first, __i); in __rotate_forward() 64 ++__first; in __rotate_forward() 67 if (__first == __middle) in __rotate_forward() [all …]
|
| H A D | stable_partition.h | 34 __stable_partition_impl(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, in __stable_partition_impl() argument 42 return __first; in __stable_partition_impl() 45 _ForwardIterator __m = __first; in __stable_partition_impl() 48 _Ops::iter_swap(__first, __m); in __stable_partition_impl() 51 return __first; in __stable_partition_impl() 61 ::new ((void*)__t) value_type(_Ops::__iter_move(__first)); in __stable_partition_impl() 64 _ForwardIterator __i = __first; in __stable_partition_impl() 69 *__first = _Ops::__iter_move(__i); in __stable_partition_impl() 70 ++__first; in __stable_partition_impl() 81 __i = __first; in __stable_partition_impl() [all …]
|
| H A D | partition.h | 27 __partition_impl(_ForwardIterator __first, _Sentinel __last, _Predicate __pred, forward_iterator_ta… in __partition_impl() argument 31 if (__first == __last) in __partition_impl() 32 return std::make_pair(std::move(__first), std::move(__first)); in __partition_impl() 33 if (!__pred(*__first)) in __partition_impl() 35 ++__first; in __partition_impl() 38 _ForwardIterator __p = __first; in __partition_impl() 43 _IterOps<_AlgPolicy>::iter_swap(__first, __p); in __partition_impl() 44 ++__first; in __partition_impl() 47 return std::make_pair(std::move(__first), std::move(__p)); in __partition_impl() 52 __partition_impl(_BidirectionalIterator __first, _Sentinel __sentinel, _Predicate __pred, in __partition_impl() argument [all …]
|
| H A D | unique_copy.h | 38 __unique_copy(_InputIterator __first, in __unique_copy() argument 43 if (__first != __last) { in __unique_copy() 44 typename _IterOps<_AlgPolicy>::template __value_type<_InputIterator> __t(*__first); in __unique_copy() 47 while (++__first != __last) { in __unique_copy() 48 if (!__pred(__t, *__first)) { in __unique_copy() 49 __t = *__first; in __unique_copy() 55 return pair<_InputIterator, _OutputIterator>(std::move(__first), std::move(__result)); in __unique_copy() 60 __unique_copy(_ForwardIterator __first, in __unique_copy() argument 65 if (__first != __last) { in __unique_copy() 66 _ForwardIterator __i = __first; in __unique_copy() [all …]
|
| H A D | minmax_element.h | 43 pair<_Iter, _Iter> __minmax_element_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj)… in __minmax_element_impl() argument 46 pair<_Iter, _Iter> __result(__first, __first); in __minmax_element_impl() 47 if (__first == __last || ++__first == __last) in __minmax_element_impl() 50 if (__less(__first, __result.first)) in __minmax_element_impl() 51 __result.first = __first; in __minmax_element_impl() 53 __result.second = __first; in __minmax_element_impl() 55 while (++__first != __last) { in __minmax_element_impl() 56 _Iter __i = __first; in __minmax_element_impl() 57 if (++__first == __last) { in __minmax_element_impl() 65 if (__less(__first, __i)) { in __minmax_element_impl() [all …]
|
| H A D | nth_element.h | 46 __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __l… in __nth_element() argument 57 difference_type __len = __last - __first; in __nth_element() 64 if (__comp(*--__last, *__first)) in __nth_element() 65 _Ops::iter_swap(__first, __last); in __nth_element() 69 _RandomAccessIterator __m = __first; in __nth_element() 70 std::__sort3<_AlgPolicy, _Compare>(__first, ++__m, --__last, __comp); in __nth_element() 76 std::__selection_sort<_AlgPolicy, _Compare>(__first, __last, __comp); in __nth_element() 80 _RandomAccessIterator __m = __first + __len/2; in __nth_element() 82 unsigned __n_swaps = std::__sort3<_AlgPolicy, _Compare>(__first, __m, --__lm1, __comp); in __nth_element() 86 _RandomAccessIterator __i = __first; in __nth_element() [all …]
|
| H A D | unique.h | 30 __unique(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) { in __unique() argument 31 __first = std::__adjacent_find(__first, __last, __pred); in __unique() 32 if (__first != __last) { in __unique() 35 _Iter __i = __first; in __unique() 37 if (!__pred(*__first, *__i)) in __unique() 38 *++__first = _IterOps<_AlgPolicy>::__iter_move(__i); in __unique() 39 ++__first; in __unique() 40 return std::pair<_Iter, _Iter>(std::move(__first), std::move(__i)); in __unique() 42 return std::pair<_Iter, _Iter>(__first, __first); in __unique() 47 unique(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred) { in unique() argument [all …]
|
| H A D | copy.h | 37 operator()(_InIter __first, _Sent __last, _OutIter __result) const { in operator() 38 while (__first != __last) { in operator() 39 *__result = *__first; in operator() 40 ++__first; in operator() 44 return std::make_pair(std::move(__first), std::move(__result)); in operator() 49 operator()(_InIter __first, _InIter __last, _OutIter __result) const { in operator() 51 auto __sfirst = _Traits::__segment(__first); in operator() 54 …auto __iters = std::__copy<_AlgPolicy>(_Traits::__local(__first), _Traits::__local(__last), std::m… in operator() 58 …__result = std::__copy<_AlgPolicy>(_Traits::__local(__first), _Traits::__end(__sfirst), std::move(… in operator() 76 operator()(_InIter __first, _InIter __last, _OutIter __result) { in operator() [all …]
|
| /openbsd-src/gnu/gcc/libstdc++-v3/include/debug/ |
| H A D | functions.h | 95 __valid_range_aux2(const _RandomAccessIterator& __first, in __valid_range_aux2() argument 98 { return __last - __first >= 0; } in __valid_range_aux2() 124 __valid_range_aux(const _InputIterator& __first, in __valid_range_aux() argument 129 return __valid_range_aux2(__first, __last, _Category()); in __valid_range_aux() 139 __valid_range(const _InputIterator& __first, const _InputIterator& __last) in __valid_range() argument 142 return __valid_range_aux(__first, __last, _Integral()); in __valid_range() 148 __valid_range(const _Safe_iterator<_Iterator, _Sequence>& __first, in __valid_range() argument 150 { return __first._M_valid_range(__last); } in __valid_range() 158 __check_valid_range(const _InputIterator& __first, in __check_valid_range() argument 162 _GLIBCXX_DEBUG_ASSERT(__valid_range(__first, __last)); in __check_valid_range() [all …]
|
| /openbsd-src/gnu/llvm/libcxx/include/__random/ |
| H A D | seed_seq.h | 47 seed_seq(_InputIterator __first, _InputIterator __last) { in seed_seq() argument 50 __init(__first, __last); in seed_seq() 55 void generate(_RandomAccessIterator __first, _RandomAccessIterator __last); 73 void __init(_InputIterator __first, _InputIterator __last); 80 seed_seq::__init(_InputIterator __first, _InputIterator __last) in __init() argument 82 for (_InputIterator __s = __first; __s != __last; ++__s) in __init() 88 seed_seq::generate(_RandomAccessIterator __first, _RandomAccessIterator __last) in generate() argument 90 if (__first != __last) in generate() 92 _VSTD::fill(__first, __last, 0x8b8b8b8b); in generate() 93 const size_t __n = static_cast<size_t>(__last - __first); in generate() [all …]
|
| /openbsd-src/gnu/llvm/libcxx/include/__charconv/ |
| H A D | to_chars_base_10.h | 32 _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append1(char* __first, uint32_t … in __append1() argument 33 *__first = '0' + static_cast<char>(__value); in __append1() 34 return __first + 1; in __append1() 37 _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append2(char* __first, uint32_t … in __append2() argument 38 return std::copy_n(&__digits_base_10[__value * 2], 2, __first); in __append2() 41 _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append3(char* __first, uint32_t … in __append3() argument 42 return __itoa::__append2(__itoa::__append1(__first, __value / 100), __value % 100); in __append3() 45 _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append4(char* __first, uint32_t … in __append4() argument 46 return __itoa::__append2(__itoa::__append2(__first, __value / 100), __value % 100); in __append4() 49 _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append5(char* __first, uint32_t … in __append5() argument [all …]
|
| /openbsd-src/gnu/llvm/libcxx/include/__numeric/ |
| H A D | partial_sum.h | 26 partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result) in partial_sum() argument 28 if (__first != __last) in partial_sum() 30 typename iterator_traits<_InputIterator>::value_type __t(*__first); in partial_sum() 32 for (++__first, (void) ++__result; __first != __last; ++__first, (void) ++__result) in partial_sum() 35 __t = _VSTD::move(__t) + *__first; in partial_sum() 37 __t = __t + *__first; in partial_sum() 48 partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result, in partial_sum() argument 51 if (__first != __last) in partial_sum() 53 typename iterator_traits<_InputIterator>::value_type __t(*__first); in partial_sum() 55 for (++__first, (void) ++__result; __first != __last; ++__first, (void) ++__result) in partial_sum() [all …]
|
| /openbsd-src/gnu/llvm/libcxx/src/ |
| H A D | charconv.cpp | 45 to_chars_result to_chars(char* __first, char* __last, float __value) { in to_chars() argument 46 …return _Floating_to_chars<_Floating_to_chars_overload::_Plain>(__first, __last, __value, chars_for… in to_chars() 49 to_chars_result to_chars(char* __first, char* __last, double __value) { in to_chars() argument 50 …return _Floating_to_chars<_Floating_to_chars_overload::_Plain>(__first, __last, __value, chars_for… in to_chars() 53 to_chars_result to_chars(char* __first, char* __last, long double __value) { in to_chars() argument 54 …return _Floating_to_chars<_Floating_to_chars_overload::_Plain>(__first, __last, static_cast<double… in to_chars() 58 to_chars_result to_chars(char* __first, char* __last, float __value, chars_format __fmt) { in to_chars() argument 59 …return _Floating_to_chars<_Floating_to_chars_overload::_Format_only>(__first, __last, __value, __f… in to_chars() 62 to_chars_result to_chars(char* __first, char* __last, double __value, chars_format __fmt) { in to_chars() argument 63 …return _Floating_to_chars<_Floating_to_chars_overload::_Format_only>(__first, __last, __value, __f… in to_chars() [all …]
|
| /openbsd-src/gnu/llvm/libcxx/include/ |
| H A D | __bit_reference | 183 __find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n) 189 if (__first.__ctz_ != 0) 191 __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_); 193 …__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __… 194 __storage_type __b = *__first.__seg_ & __m; 196 return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__libcpp_ctz(__b))); 198 return __first + __n; 200 ++__first.__seg_; 203 for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word) 204 if (*__first.__seg_) [all …]
|