Home
last modified time | relevance | path

Searched refs:difference_type (Results 1 – 25 of 430) sorted by relevance

12345678910>>...18

/llvm-project-15.0.7/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.random.access/
H A Drandom_access_iterator.compile.pass.cpp49 self& operator+=(difference_type n);
53 self& operator-=(difference_type n);
81 self& operator+=(difference_type n);
84 self& operator-=(difference_type n);
97 self& operator-=(difference_type n);
107 self& operator+=(difference_type n);
110 self& operator-=(difference_type n);
120 self& operator+=(difference_type n);
123 self& operator-=(difference_type n);
133 self& operator+=(difference_type n);
[all …]
H A Dcontiguous_iterator.compile.pass.cpp53 self& operator+=(difference_type n);
57 self& operator-=(difference_type n);
87 self& operator+=(difference_type n);
91 self& operator-=(difference_type n);
122 self& operator+=(difference_type n);
126 self& operator-=(difference_type n);
157 self& operator+=(difference_type n);
161 self& operator-=(difference_type n);
198 self& operator+=(difference_type n);
202 self& operator-=(difference_type n);
[all …]
/llvm-project-15.0.7/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/
H A Dmember_typedefs.compile.pass.cpp22 using difference_type = int; typedef
33 using difference_type = int; typedef
44 using difference_type = int; typedef
53 using difference_type = signed char; typedef
72 static_assert(std::is_signed_v<Iter::difference_type>); in test()
82 static_assert(std::is_signed_v<Iter::difference_type>); in test()
92 static_assert(std::is_signed_v<Iter::difference_type>); in test()
108 static_assert(std::is_signed_v<Iter::difference_type>); in test()
120 static_assert(std::is_signed_v<Iter::difference_type>); in test()
129 static_assert(std::same_as<Iter::difference_type, int>); in test()
[all …]
/llvm-project-15.0.7/libcxx/test/support/
H A Diterator_traits_cpp17_iterators.h27 using difference_type = int; member
38 using difference_type = int; member
51 using difference_type = int; member
62 using difference_type = int; member
75 using difference_type = int; member
79 int& operator[](difference_type);
91 iterator_traits_cpp17_random_access_iterator& operator+=(difference_type);
92 iterator_traits_cpp17_random_access_iterator& operator-=(difference_type);
95 difference_type);
96 friend iterator_traits_cpp17_random_access_iterator operator+(difference_type,
[all …]
H A Dalmost_satisfies_types.h30 using difference_type = long;
48 using difference_type = long;
65 using difference_type = long;
103 using difference_type = long; variable
120 using difference_type = long;
137 using difference_type = long;
149 using difference_type = long;
168 using difference_type = long;
191 using difference_type = long;
216 using difference_type = long;
[all …]
H A Dtest_iterators.h34 typedef typename std::iterator_traits<It>::difference_type difference_type; typedef
72 typedef typename Traits::difference_type difference_type; typedef
110 typedef typename std::iterator_traits<It>::difference_type difference_type; typedef
146 typedef typename std::iterator_traits<It>::difference_type difference_type; typedef
184 typedef typename std::iterator_traits<It>::difference_type difference_type; typedef
238 using difference_type = typename std::iterator_traits<It>::difference_type; variable
327 typedef typename std::iterator_traits<It>::difference_type difference_type; typedef
383 typedef typename std::iterator_traits<It>::difference_type difference_type; typedef
815 difference_type stride_count_ = 0;
816 difference_type stride_displacement_ = 0;
[all …]
/llvm-project-15.0.7/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/
H A Ddifference_type.pass.cpp26 typedef char difference_type; typedef
40 typedef char difference_type; typedef
46 static int difference_type; member
52 typedef int difference_type; typedef
57 static_assert((std::is_same<std::pointer_traits<A>::difference_type, char>::value), ""); in main()
58 … static_assert((std::is_same<std::pointer_traits<B>::difference_type, std::ptrdiff_t>::value), ""); in main()
59 …static_assert((std::is_same<std::pointer_traits<C<double> >::difference_type, std::ptrdiff_t>::val… in main()
60 static_assert((std::is_same<std::pointer_traits<D<int> >::difference_type, char>::value), ""); in main()
61 …static_assert((std::is_same<std::pointer_traits<E<int> >::difference_type, std::ptrdiff_t>::value)… in main()
63 …static_assert((std::is_same<std::pointer_traits<F<int>>::difference_type, std::ptrdiff_t>::value),… in main()
/llvm-project-15.0.7/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/
H A Dincrementable.h12 using difference_type = int; member
18 using difference_type = int; member
31 using difference_type = short; member
45 using difference_type = float; member
75 using difference_type = int; member
83 using difference_type = int; member
93 using difference_type = int; member
99 using difference_type = int; member
105 using difference_type = int; member
123 using difference_type = int; member
[all …]
/llvm-project-15.0.7/libcxx/test/std/containers/sequences/forwardlist/
H A Dtypes.pass.cpp46 static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), ""); in main()
48 static_assert((std::is_signed<typename C::difference_type>::value), ""); in main()
50 static_assert((std::is_same<typename C::difference_type, in main()
51 typename std::iterator_traits<typename C::iterator>::difference_type>::value), ""); in main()
52 static_assert((std::is_same<typename C::difference_type, in main()
53 typename std::iterator_traits<typename C::const_iterator>::difference_type>::value), ""); in main()
66 static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), ""); in main()
68 static_assert((std::is_signed<typename C::difference_type>::value), ""); in main()
70 static_assert((std::is_same<typename C::difference_type, in main()
71 typename std::iterator_traits<typename C::iterator>::difference_type>::value), ""); in main()
[all …]
/llvm-project-15.0.7/libcxx/include/__algorithm/
H A Dsift_down.h27 typename iterator_traits<_RandomAccessIterator>::difference_type __len, in __sift_down()
32 typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; in __sift_down() typedef
36 difference_type __child = __start - __first; in __sift_down()
44 if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + difference_type(1)))) { in __sift_down()
69 if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + difference_type(1)))) { in __sift_down()
83 typename iterator_traits<_RandomAccessIterator>::difference_type __len) in __floyd_sift_down()
85 using difference_type = typename iterator_traits<_RandomAccessIterator>::difference_type; in __floyd_sift_down() local
90 difference_type __child = 0; in __floyd_sift_down()
93 __child_i += difference_type(__child + 1); in __floyd_sift_down()
96 if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + difference_type(1)))) { in __floyd_sift_down()
H A Dshuffle.h99 typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; in random_shuffle() typedef
102 difference_type __d = __last - __first; in random_shuffle()
109 difference_type __i = __uid(__g, _Pp(0, __d)); in random_shuffle()
110 if (__i != difference_type(0)) in random_shuffle()
125 typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; in random_shuffle() typedef
126 difference_type __d = __last - __first; in random_shuffle()
131 difference_type __i = __rand(__d); in random_shuffle()
132 if (__i != difference_type(0)) in random_shuffle()
142 typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; in __shuffle() typedef
148 difference_type __d = __last - __first; in __shuffle()
[all …]
H A Dinplace_merge.h91 typename iterator_traits<_BidirectionalIterator>::difference_type __len1, in __buffered_inplace_merge()
92 typename iterator_traits<_BidirectionalIterator>::difference_type __len2, in __buffered_inplace_merge()
124 typename iterator_traits<_BidirectionalIterator>::difference_type __len1, in __inplace_merge()
125 typename iterator_traits<_BidirectionalIterator>::difference_type __len2, in __inplace_merge()
130 typedef typename iterator_traits<_BidirectionalIterator>::difference_type difference_type; in __inplace_merge() typedef
157 difference_type __len11; // distance(__first, __m1) in __inplace_merge()
158 difference_type __len21; // distance(__middle, __m2) in __inplace_merge()
184 difference_type __len22 = __len2 - __len21; // distance(__m2, __last) in __inplace_merge()
218 typedef typename iterator_traits<_BidirectionalIterator>::difference_type difference_type; in __inplace_merge() typedef
220 difference_type __len2 = _IterOps<_AlgPolicy>::distance(__middle, __last); in __inplace_merge()
[all …]
/llvm-project-15.0.7/libcxx/test/std/containers/sequences/array/
H A Dtypes.pass.cpp41 …static_assert((std::is_same<typename ItT::difference_type, typename C::difference_type>::value), "… in test_iterators()
47 …static_assert((std::is_same<typename CItT::difference_type, typename C::difference_type>::value), … in test_iterators()
63 static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), ""); in main()
67 static_assert((std::is_signed<typename C::difference_type>::value), ""); in main()
69 static_assert((std::is_same<typename C::difference_type, in main()
70 typename std::iterator_traits<typename C::iterator>::difference_type>::value), ""); in main()
71 static_assert((std::is_same<typename C::difference_type, in main()
85 static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), ""); in main()
89 static_assert((std::is_signed<typename C::difference_type>::value), ""); in main()
91 static_assert((std::is_same<typename C::difference_type, in main()
[all …]
/llvm-project-15.0.7/libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/iterator.concept.random.access/
H A Dcontiguous_iterator.verify.cpp22 typedef std::ptrdiff_t difference_type; typedef
39 self& operator+=(difference_type n);
40 self operator+(difference_type n) const;
41 friend self operator+(difference_type n, self x);
43 self& operator-=(difference_type n);
44 self operator-(difference_type n) const;
45 difference_type operator-(const self& n) const;
47 reference operator[](difference_type n) const;
/llvm-project-15.0.7/libcxx/test/std/containers/sequences/deque/
H A Dtypes.pass.cpp53 …static_assert((std::is_same<typename C::difference_type, typename Allocator::difference_type>::val… in test()
70 static_assert((std::is_signed<typename C::difference_type>::value), ""); in test()
72 static_assert((std::is_same<typename C::difference_type, in test()
73 typename std::iterator_traits<typename C::iterator>::difference_type>::value), ""); in test()
74 static_assert((std::is_same<typename C::difference_type, in test()
75 typename std::iterator_traits<typename C::const_iterator>::difference_type>::value), ""); in test()
97 static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), ""); in main()
99 static_assert((std::is_signed<typename C::difference_type>::value), ""); in main()
101 static_assert((std::is_same<typename C::difference_type, in main()
102 typename std::iterator_traits<typename C::iterator>::difference_type>::value), ""); in main()
[all …]
/llvm-project-15.0.7/libcxx/test/std/iterators/iterator.primitives/iterator.traits/
H A Dempty.fail.cpp32 typedef int difference_type; typedef
41 typedef int difference_type; typedef
50 typedef int difference_type; typedef
59 typedef int difference_type; typedef
70 …typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std:{{… in main()
79 …typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std:{{… in main()
88 …typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std:{{… in main()
97 …typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std:{{… in main()
106 …typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std:{{… in main()
115 …typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std:{{… in main()
H A Dcxx20_iterator_traits.compile.pass.cpp172 struct difference_type {}; struct
179 static_assert(std::same_as<AllMembersTraits::difference_type, AllMembers::difference_type>);
187 struct difference_type {}; struct
195 static_assert(std::same_as<NoPointerMemberTraits::difference_type, NoPointerMember::difference_type
203 struct difference_type {}; struct
212 static_assert(std::same_as<IterConceptTraits::difference_type, IterConcept::difference_type>);
229 using difference_type = short; typedef
241 using difference_type = int; // or any signed integral type typedef
325 using difference_type = short; typedef
460 using difference_type = long; typedef
[all …]
/llvm-project-15.0.7/libcxx/test/std/containers/sequences/list/
H A Dtypes.pass.cpp46 static_assert((std::is_signed<typename C::difference_type>::value), ""); in main()
48 static_assert((std::is_same<typename C::difference_type, in main()
49 typename std::iterator_traits<typename C::iterator>::difference_type>::value), ""); in main()
50 static_assert((std::is_same<typename C::difference_type, in main()
51 typename std::iterator_traits<typename C::const_iterator>::difference_type>::value), ""); in main()
64 static_assert((std::is_signed<typename C::difference_type>::value), ""); in main()
66 static_assert((std::is_same<typename C::difference_type, in main()
67 typename std::iterator_traits<typename C::iterator>::difference_type>::value), ""); in main()
68 static_assert((std::is_same<typename C::difference_type, in main()
69 typename std::iterator_traits<typename C::const_iterator>::difference_type>::value), ""); in main()
/llvm-project-15.0.7/libcxx/test/libcxx/algorithms/
H A Dbad_iterator_traits.verify.cpp30 using difference_type = long; typedef
34 reference operator[](difference_type n) const;
41 BadIter& operator+=(difference_type n);
42 BadIter& operator-=(difference_type n);
43 friend BadIter operator+(BadIter x, difference_type n);
44 friend BadIter operator+(difference_type n, BadIter x);
45 friend BadIter operator-(BadIter x, difference_type n);
46 friend difference_type operator-(BadIter x, BadIter y);
/llvm-project-15.0.7/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/
H A Ddifference_type.pass.cpp28 typedef short difference_type; typedef
53 typedef void difference_type; typedef
64 typedef signed char difference_type; typedef
71 … static_assert((std::is_same<std::allocator_traits<A<char> >::difference_type, short>::value), ""); in main()
72 …static_assert((std::is_same<std::allocator_traits<B<char> >::difference_type, std::ptrdiff_t>::val… in main()
73 …static_assert((std::is_same<std::allocator_traits<C<char> >::difference_type, signed char>::value)… in main()
75 …static_assert((std::is_same<std::allocator_traits<D<char> >::difference_type, std::ptrdiff_t>::val… in main()
/llvm-project-15.0.7/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/
H A Dctor.pass.cpp22 typedef std::ptrdiff_t difference_type; typedef
40 self& operator+=(difference_type n);
41 self operator+(difference_type n) const;
42 friend self operator+(difference_type n, self x);
44 self& operator-=(difference_type n);
45 self operator-(difference_type n) const;
46 difference_type operator-(const self&) const;
48 reference operator[](difference_type n) const;
/llvm-project-15.0.7/libcxx/include/__functional/
H A Dboyer_moore_searcher.h104 using difference_type = typename std::iterator_traits<_RandomAccessIterator1>::difference_type;
127 difference_type __i = 0; in __first_()
156 difference_type __pattern_length_;
158 shared_ptr<difference_type[]> __suffix_;
168 difference_type __j = __pattern_length_; in __search()
176 difference_type __m = __j - __k - 1; in __search()
208 vector<difference_type> __scratch(__count); in __build_suffix_table()
232 using difference_type = typename iterator_traits<_RandomAccessIterator1>::difference_type;
255 difference_type __i = 0; in __first_()
284 difference_type __pattern_length_;
[all …]
/llvm-project-15.0.7/libcxx/test/std/ranges/range.factories/range.iota.view/
H A Dtypes.h15 using difference_type = int; member
29 friend constexpr SomeInt& operator+=(SomeInt &lhs, difference_type rhs) {
43 friend constexpr SomeInt operator+(SomeInt lhs, difference_type rhs) {
46 friend constexpr int operator-(SomeInt lhs, difference_type rhs) {
50 friend constexpr SomeInt operator+(difference_type lhs, SomeInt rhs) {
53 friend constexpr int operator-(difference_type lhs, SomeInt rhs) {
65 using difference_type = std::iter_difference_t<T>; member
94 using difference_type = std::iter_difference_t<T>; member
128 using difference_type = int; member
156 using difference_type = int; member
[all …]
/llvm-project-15.0.7/libcxx/test/libcxx/iterators/
H A Dcontiguous_iterators.pass.cpp48 typedef int difference_type; typedef in my_input_iterator
70 typedef int difference_type; typedef in my_random_access_iterator
77 reference operator[](difference_type) const;
85 friend Self operator+(Self, difference_type);
86 friend Self operator+(difference_type, Self);
87 friend Self operator-(Self, difference_type);
88 friend difference_type operator-(Self, Self);
106 typedef int difference_type; typedef in my_contiguous_iterator
114 reference operator[](difference_type) const;
122 friend Self operator+(Self, difference_type);
[all …]
/llvm-project-15.0.7/libcxx/test/std/containers/sequences/vector.bool/
H A Dtypes.pass.cpp49 …tatic_assert((std::is_same<typename C::difference_type, typename std::allocator_traits<Allocator>:… in test()
51 static_assert((std::is_signed<typename C::difference_type>::value), ""); in test()
53 static_assert((std::is_same<typename C::difference_type, in test()
54 typename std::iterator_traits<typename C::iterator>::difference_type>::value), ""); in test()
55 static_assert((std::is_same<typename C::difference_type, in test()
56 typename std::iterator_traits<typename C::const_iterator>::difference_type>::value), ""); in test()

12345678910>>...18