Home
last modified time | relevance | path

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

12345678910>>...19

/llvm-project/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.random.access/
H A Drandom_access_iterator.compile.pass.cpp34 typedef std::ptrdiff_t difference_type; typedef
49 self& operator+=(difference_type n);
50 self operator+(difference_type n) const;
51 friend self operator+(difference_type n, self x);
53 self& operator-=(difference_type n);
54 self operator-(difference_type n) const;
55 difference_type operator-(const self&) const;
57 reference operator[](difference_type n) const;
66 typedef std::ptrdiff_t difference_type; typedef
81 self& operator+=(difference_type n);
[all …]
H A Dcontiguous_iterator.compile.pass.cpp36 typedef std::ptrdiff_t difference_type; typedef
53 self& operator+=(difference_type n);
54 self operator+(difference_type n) const;
55 friend self operator+(difference_type n, self x);
57 self& operator-=(difference_type n);
58 self operator-(difference_type n) const;
59 difference_type operator-(const self& n) const;
61 reference operator[](difference_type n) const;
70 typedef std::ptrdiff_t difference_type; typedef
87 self& operator+=(difference_type n);
[all …]
/llvm-project/libcxx/test/libcxx/algorithms/
H A Dcpp17_iterator_concepts.verify.cpp19 using difference_type = std::ptrdiff_t; typedef
28 using difference_type = std::ptrdiff_t; typedef
38 using difference_type = std::ptrdiff_t; typedef
82 using difference_type = unsigned; typedef
182 using difference_type = typename valid_forward_iterator<Derived>::difference_type; typedef
187 Derived& operator+=(difference_type);
188 Derived& operator-=(difference_type);
190 friend Derived operator+(valid_random_access_iterator, difference_type);
191 friend Derived operator+(difference_type, valid_random_access_iterato
[all...]
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/libcxx/test/support/
H A Dalmost_satisfies_types.h31 using difference_type = long;
53 using difference_type = long;
70 using difference_type = long;
108 using difference_type = long; variable
125 using difference_type = long;
142 using difference_type = long;
154 using difference_type = long;
173 using difference_type = long;
196 using difference_type = long;
221 using difference_type = long;
[all …]
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 Dtest_iterators.h38 typedef typename std::iterator_traits<It>::difference_type difference_type;
85 typedef typename Traits::difference_type difference_type; in cpp17_input_iterator()
132 typedef typename std::iterator_traits<It>::difference_type difference_type; in forward_iterator()
176 typedef typename std::iterator_traits<It>::difference_type difference_type;
222 typedef typename std::iterator_traits<It>::difference_type difference_type;
35 typedef typename std::iterator_traits<It>::difference_type difference_type; global() typedef
78 typedef typename Traits::difference_type difference_type; global() typedef
121 typedef typename std::iterator_traits<It>::difference_type difference_type; global() typedef
161 typedef typename std::iterator_traits<It>::difference_type difference_type; global() typedef
203 typedef typename std::iterator_traits<It>::difference_type difference_type; global() typedef
261 using difference_type = typename std::iterator_traits<It>::difference_type; global() variable
352 typedef typename std::iterator_traits<It>::difference_type difference_type; global() typedef
410 typedef typename std::iterator_traits<It>::difference_type difference_type; global() typedef
458 typedef std::ptrdiff_t difference_type; global() typedef
569 typedef std::ptrdiff_t difference_type; global() typedef
644 using difference_type = std::iter_difference_t<It>; global() variable
[all...]
/llvm-project/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
71 static_assert(sizeof(Iter::difference_type) > sizeof(char)); in test()
72 static_assert(std::is_signed_v<Iter::difference_type>); in test()
73 LIBCPP_STATIC_ASSERT(std::same_as<Iter::difference_type, int>); in test()
81 static_assert(sizeof(Iter::difference_type) > sizeof(short)); in test()
82 static_assert(std::is_signed_v<Iter::difference_type>); in test()
83 LIBCPP_STATIC_ASSERT(std::same_as<Iter::difference_type, int>); in test()
[all …]
/llvm-project/libcxx/include/__algorithm/
H A Dsort.h276 typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
280 const _RandomAccessIterator __leftmost = __first - difference_type(1);
282 for (_RandomAccessIterator __i = __first + difference_type(1); __i != __last; ++__i) {
283 _RandomAccessIterator __j = __i - difference_type(1);
305 typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
315 std::__sort3<_AlgPolicy, _Comp>(__first, __first + difference_type(1), --__last, __comp);
319 __first, __first + difference_type(1), __first + difference_type(
[all...]
H A Dsift_down.h31 typename iterator_traits<_RandomAccessIterator>::difference_type __len, in __sift_down()
35 typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; in __sift_down() typedef
39 difference_type __child = __start - __first; in __sift_down()
47 if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + difference_type(1)))) { in __sift_down()
71 if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + difference_type(1)))) { in __sift_down()
86 typename iterator_traits<_RandomAccessIterator>::difference_type __len) { in __floyd_sift_down()
87 using difference_type = typename iterator_traits<_RandomAccessIterator>::difference_type; in __floyd_sift_down() local
92 difference_type __child = 0; in __floyd_sift_down()
95 __child_i += difference_type(__child + 1); in __floyd_sift_down()
98 if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + difference_type(1)))) { in __floyd_sift_down()
H A Dshuffle.h97 typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; in random_shuffle() typedef
100 difference_type __d = __last - __first; in random_shuffle()
105 difference_type __i = __uid(__g, _Pp(0, __d)); in random_shuffle()
106 if (__i != difference_type(0)) in random_shuffle()
122 typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; in random_shuffle() typedef
123 difference_type __d = __last - __first; in random_shuffle()
126 difference_type __i = __rand(__d); in random_shuffle()
127 if (__i != difference_type( in random_shuffle()
137 typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; __shuffle() typedef
[all...]
H A Dinplace_merge.h99 typename iterator_traits<_BidirectionalIterator>::difference_type __len1, in __buffered_inplace_merge()
100 typename iterator_traits<_BidirectionalIterator>::difference_type __len2, in __buffered_inplace_merge()
130 typename iterator_traits<_BidirectionalIterator>::difference_type __len1, in __inplace_merge()
131 typename iterator_traits<_BidirectionalIterator>::difference_type __len2, in __inplace_merge()
136 typedef typename iterator_traits<_BidirectionalIterator>::difference_type difference_type; in __inplace_merge()
160 difference_type __len11; // distance(__first, __m1) in __inplace_merge()
161 difference_type __len21; // distance(__middle, __m2) in __inplace_merge()
182 difference_type __len12 = __len1 - __len11; // distance(__m1, __middle) in __inplace_merge()
183 difference_type __len2 in __inplace_merge()
137 typedef typename iterator_traits<_BidirectionalIterator>::difference_type difference_type; __inplace_merge() typedef
210 typedef typename iterator_traits<_BidirectionalIterator>::difference_type difference_type; __inplace_merge() typedef
[all...]
/llvm-project/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()
61 static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), ""); in main()
65 static_assert((std::is_signed<typename C::difference_type>::value), ""); in main()
67 static_assert((std::is_same<typename C::difference_type, in main()
68 typename std::iterator_traits<typename C::iterator>::difference_type>::value), ""); in main()
69 static_assert((std::is_same<typename C::difference_type, in main()
70 … typename std::iterator_traits<typename C::const_iterator>::difference_type>::value), ""); in main()
81 static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), ""); in main()
85 static_assert((std::is_signed<typename C::difference_type>::value), ""); in main()
[all …]
/llvm-project/libcxx/test/std/ranges/range.factories/range.repeat.view/iterator/
H A Dmember_typedefs.compile.pass.cpp17 // using difference_type = see below:
18 // If is-signed-integer-like<index-type> is true, the member typedef-name difference_type denotes
35 static_assert(std::same_as<Iter::difference_type, ptrdiff_t>); in test()
36 static_assert(std::is_signed_v<Iter::difference_type>); in test()
46 static_assert(std::is_signed_v<Iter::difference_type>); in test()
47 static_assert(sizeof(Iter::difference_type) == sizeof(std::int8_t)); in test()
55 static_assert(std::is_signed_v<Iter::difference_type>); in test()
56 static_assert(sizeof(Iter::difference_type) > sizeof(std::uint8_t)); in test()
64 static_assert(std::is_signed_v<Iter::difference_type>); in test()
65 static_assert(sizeof(Iter::difference_type) in test()
[all...]
/llvm-project/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/
H A Ddifference_type.compile.pass.cpp14 // typedef <details> difference_type;
27 typedef char difference_type;
41 typedef char difference_type;
47 static int difference_type;
53 typedef int difference_type;
56 static_assert(std::is_same<std::pointer_traits<A>::difference_type, char>::value, "");
57 static_assert(std::is_same<std::pointer_traits<B>::difference_type, std::ptrdiff_t>::value, "");
58 static_assert(std::is_same<std::pointer_traits<C<double> >::difference_type, std::ptrdiff_t>::value, "");
59 static_assert(std::is_same<std::pointer_traits<D<int> >::difference_type, char>::value, "");
60 static_assert(std::is_same<std::pointer_traits<E<int> >::difference_type, st
26 typedef char difference_type; global() typedef
40 typedef char difference_type; global() typedef
46 static int difference_type; global() member
52 typedef int difference_type; global() typedef
[all...]
/llvm-project/libcxx/test/std/containers/sequences/forwardlist/
H A Dtypes.pass.cpp23 // typedef typename allocator_traits<allocator_type>::difference_type difference_type;
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()
72 static_assert((std::is_same<typename C::difference_type, in main()
73 typename std::iterator_traits<typename C::const_iterator>::difference_type>::value), ""); in main()
85 static_assert((std::is_same<C::size_type, std::make_unsigned<C::difference_type>::type>::value), "");
86 static_assert((std::is_same<C::difference_type, st
[all...]
/llvm-project/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/
H A Dincrementable.h13 using difference_type = int; member
19 using difference_type = int; member
32 using difference_type = short; member
46 using difference_type = float; member
67 using difference_type = float; member
76 using difference_type = int; member
84 using difference_type = int; member
94 using difference_type = int; member
100 using difference_type = int; member
106 using difference_type = int; member
[all …]
/llvm-project/libcxx/test/std/containers/sequences/deque/
H A Dtypes.pass.cpp53 …(std::is_same<typename C::difference_type, typename std::allocator_traits<Allocator>::difference_t… in test()
75 static_assert((std::is_signed<typename C::difference_type>::value), ""); in test()
77 static_assert((std::is_same<typename C::difference_type, in test()
78 typename std::iterator_traits<typename C::iterator>::difference_type>::value), ""); in test()
79 static_assert((std::is_same<typename C::difference_type, in test()
80 typename std::iterator_traits<typename C::const_iterator>::difference_type>::value), ""); in test()
101 …static_assert((std::is_same<C::size_type, std::make_unsigned<C::difference_type>::type>::value), "… in main()
102 static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), ""); in main()
104 static_assert((std::is_signed<typename C::difference_type>::value), ""); in main()
106 static_assert((std::is_same<typename C::difference_type, in main()
[all …]
/llvm-project/libcxx/test/std/iterators/iterator.primitives/iterator.traits/
H A Dempty.verify.cpp
H A Dcxx20_iterator_traits.compile.pass.cpp60 static_assert(std::same_as<typename Traits::difference_type, DiffType>); in test()
177 struct difference_type {}; struct
184 static_assert(std::same_as<AllMembersTraits::difference_type, AllMembers::difference_type>);
192 struct difference_type {}; struct
200 static_assert(std::same_as<NoPointerMemberTraits::difference_type, NoPointerMember::difference_type
208 struct difference_type {}; struct
217 static_assert(std::same_as<IterConceptTraits::difference_type, IterConcept::difference_type>);
234 using difference_type = short; typedef
239 static_assert(std::same_as<LegacyInputTraits::difference_type, short>);
246 using difference_type = int; // or any signed integral type typedef
[all …]
/llvm-project/libcxx/test/std/containers/sequences/list/
H A Dtypes.pass.cpp65 static_assert((std::is_signed<typename C::difference_type>::value), ""); in main()
67 static_assert((std::is_same<typename C::difference_type, in main()
68 typename std::iterator_traits<typename C::iterator>::difference_type>::value), ""); in main()
69 static_assert((std::is_same<typename C::difference_type, in main()
70 typename std::iterator_traits<typename C::const_iterator>::difference_type>::value), ""); in main()
83 static_assert((std::is_signed<typename C::difference_type>::value), "");
85 static_assert((std::is_same<typename C::difference_type,
86 typename std::iterator_traits<typename C::iterator>::difference_type>::value), "");
87 static_assert((std::is_same<typename C::difference_type,
88 typename std::iterator_traits<typename C::const_iterator>::difference_type>
[all...]
/llvm-project/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/
H A Dctor.pass.cpp21 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&) const;
47 reference operator[](difference_type n) const;
/llvm-project/libcxx/include/__functional/
H A Dboyer_moore_searcher.h93 using difference_type = typename std::iterator_traits<_RandomAccessIterator1>::difference_type;
97 difference_type,
114 __suffix_(std::__allocate_shared_unbounded_array<difference_type[]>( in __first_()
115 allocator<difference_type>(), __pattern_length_ + 1)) { in __first_()
116 difference_type __i = 0; in __first_()
145 difference_type __pattern_length_;
147 shared_ptr<difference_type[]> __suffix_;
157 difference_type __j = __pattern_length_; in __search()
164 difference_type __ in __search()
[all...]
/llvm-project/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/
H A Ddifference_type.pass.cpp14 // typedef Alloc::difference_type
15 // | pointer_traits<pointer>::difference_type difference_type;
29 typedef short difference_type;
54 typedef void difference_type;
61 typedef signed char difference_type;
66 static_assert((std::is_same<std::allocator_traits<A<char> >::difference_type, short>::value), "");
67 static_assert((std::is_same<std::allocator_traits<B<char> >::difference_type, std::ptrdiff_t>::value), "");
68 static_assert((std::is_same<std::allocator_traits<C<char> >::difference_type, signed char>::value), "");
70 static_assert((std::is_same<std::allocator_traits<D<char> >::difference_type, st in main()
28 typedef short difference_type; global() typedef
53 typedef void difference_type; global() typedef
64 typedef signed char difference_type; global() typedef
[all...]
/llvm-project/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;
83 friend Self& operator+=(Self&, difference_type);
84 friend Self& operator-=(Self&, difference_type);
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
[all …]

12345678910>>...19