Lines Matching refs:std
44 std::vector<ValueHolder> input({ 1, 7, 3, 8 }); in TEST()
45 std::vector<int> output; in TEST()
48 static_assert(std::is_same<std::random_access_iterator_tag, in TEST()
50 static_assert(std::is_same<int, vector_titer::value_type>::value, "value_type"); in TEST()
51 static_assert(std::is_same<vector_titer, vector_titer::pointer>::value, "pointer"); in TEST()
52 static_assert(std::is_same<int, vector_titer::reference>::value, "reference"); in TEST()
55 static_assert(std::is_same<std::random_access_iterator_tag, in TEST()
57 static_assert(std::is_same<int, vector_ctiter::value_type>::value, "value_type"); in TEST()
58 static_assert(std::is_same<vector_ctiter, vector_ctiter::pointer>::value, "pointer"); in TEST()
59 static_assert(std::is_same<int, vector_ctiter::reference>::value, "reference"); in TEST()
62 static_assert(std::is_same<std::random_access_iterator_tag, in TEST()
64 static_assert(std::is_same<int, vector_rtiter::value_type>::value, "value_type"); in TEST()
65 static_assert(std::is_same<vector_rtiter, vector_rtiter::pointer>::value, "pointer"); in TEST()
66 static_assert(std::is_same<int, vector_rtiter::reference>::value, "reference"); in TEST()
69 static_assert(std::is_same<std::random_access_iterator_tag, in TEST()
71 static_assert(std::is_same<int, vector_crtiter::value_type>::value, "value_type"); in TEST()
72 static_assert(std::is_same<vector_crtiter, vector_crtiter::pointer>::value, "pointer"); in TEST()
73 static_assert(std::is_same<int, vector_crtiter::reference>::value, "reference"); in TEST()
75 std::copy(MakeTransformIterator(input.begin(), add1), in TEST()
77 std::back_inserter(output)); in TEST()
78 ASSERT_EQ(std::vector<int>({ 2, 8, 4, 9 }), output); in TEST()
81 std::copy(MakeTransformIterator(input.cbegin(), add1), in TEST()
83 std::back_inserter(output)); in TEST()
84 ASSERT_EQ(std::vector<int>({ 2, 8, 4, 9 }), output); in TEST()
87 std::copy(MakeTransformIterator(input.rbegin(), add1), in TEST()
89 std::back_inserter(output)); in TEST()
90 ASSERT_EQ(std::vector<int>({ 9, 4, 8, 2 }), output); in TEST()
93 std::copy(MakeTransformIterator(input.crbegin(), add1), in TEST()
95 std::back_inserter(output)); in TEST()
96 ASSERT_EQ(std::vector<int>({ 9, 4, 8, 2 }), output); in TEST()
137 static_assert(!std::is_same<decltype(it), decltype(cit)>::value, "Types must be different"); in TEST()
141 static_assert(!std::is_same<decltype(rit), decltype(crit)>::value, "Types must be different"); in TEST()
147 std::list<ValueHolder> input({ 2, 3, 5, 7, 11 }); in TEST()
148 std::vector<int> output; in TEST()
151 static_assert(std::is_same<std::bidirectional_iterator_tag, in TEST()
153 static_assert(std::is_same<int, list_titer::value_type>::value, "value_type"); in TEST()
154 static_assert(std::is_same<list_titer, list_titer::pointer>::value, "pointer"); in TEST()
155 static_assert(std::is_same<int, list_titer::reference>::value, "reference"); in TEST()
158 static_assert(std::is_same<std::bidirectional_iterator_tag, in TEST()
160 static_assert(std::is_same<int, list_ctiter::value_type>::value, "value_type"); in TEST()
161 static_assert(std::is_same<list_ctiter, list_ctiter::pointer>::value, "pointer"); in TEST()
162 static_assert(std::is_same<int, list_ctiter::reference>::value, "reference"); in TEST()
165 static_assert(std::is_same<std::bidirectional_iterator_tag, in TEST()
167 static_assert(std::is_same<int, list_rtiter::value_type>::value, "value_type"); in TEST()
168 static_assert(std::is_same<list_rtiter, list_rtiter::pointer>::value, "pointer"); in TEST()
169 static_assert(std::is_same<int, list_rtiter::reference>::value, "reference"); in TEST()
172 static_assert(std::is_same<std::bidirectional_iterator_tag, in TEST()
174 static_assert(std::is_same<int, list_crtiter::value_type>::value, "value_type"); in TEST()
175 static_assert(std::is_same<list_crtiter, list_crtiter::pointer>::value, "pointer"); in TEST()
176 static_assert(std::is_same<int, list_crtiter::reference>::value, "reference"); in TEST()
178 std::copy(MakeTransformIterator(input.begin(), sub1), in TEST()
180 std::back_inserter(output)); in TEST()
181 ASSERT_EQ(std::vector<int>({ 1, 2, 4, 6, 10 }), output); in TEST()
184 std::copy(MakeTransformIterator(input.cbegin(), sub1), in TEST()
186 std::back_inserter(output)); in TEST()
187 ASSERT_EQ(std::vector<int>({ 1, 2, 4, 6, 10 }), output); in TEST()
190 std::copy(MakeTransformIterator(input.rbegin(), sub1), in TEST()
192 std::back_inserter(output)); in TEST()
193 ASSERT_EQ(std::vector<int>({ 10, 6, 4, 2, 1 }), output); in TEST()
196 std::copy(MakeTransformIterator(input.crbegin(), sub1), in TEST()
198 std::back_inserter(output)); in TEST()
199 ASSERT_EQ(std::vector<int>({ 10, 6, 4, 2, 1 }), output); in TEST()
205 static_assert(!std::is_same<decltype(it), decltype(cit)>::value, "Types must be different"); in TEST()
211 std::forward_list<ValueHolder> input({ 1, 1, 2, 3, 5, 8 }); in TEST()
212 std::vector<int> output; in TEST()
215 static_assert(std::is_same<std::forward_iterator_tag, in TEST()
217 static_assert(std::is_same<int, flist_titer::value_type>::value, "value_type"); in TEST()
218 static_assert(std::is_same<flist_titer, flist_titer::pointer>::value, "pointer"); in TEST()
219 static_assert(std::is_same<int, flist_titer::reference>::value, "reference"); in TEST()
222 static_assert(std::is_same<std::forward_iterator_tag, in TEST()
224 static_assert(std::is_same<int, flist_ctiter::value_type>::value, "value_type"); in TEST()
225 static_assert(std::is_same<flist_ctiter, flist_ctiter::pointer>::value, "pointer"); in TEST()
226 static_assert(std::is_same<int, flist_ctiter::reference>::value, "reference"); in TEST()
228 std::copy(MakeTransformIterator(input.begin(), mul3), in TEST()
230 std::back_inserter(output)); in TEST()
231 ASSERT_EQ(std::vector<int>({ 3, 3, 6, 9, 15, 24 }), output); in TEST()
234 std::copy(MakeTransformIterator(input.cbegin(), mul3), in TEST()
236 std::back_inserter(output)); in TEST()
237 ASSERT_EQ(std::vector<int>({ 3, 3, 6, 9, 15, 24 }), output); in TEST()
243 static_assert(!std::is_same<decltype(it), decltype(cit)>::value, "Types must be different"); in TEST()
249 std::vector<ValueHolder> input({ 7, 3, 1, 2, 4, 8 }); in TEST()
250 std::vector<int> output; in TEST()
253 static_assert(std::is_same<std::random_access_iterator_tag, in TEST()
255 static_assert(std::is_same<int, vector_titer::value_type>::value, "value_type"); in TEST()
256 static_assert(std::is_same<const int*, vector_titer::pointer>::value, "pointer"); in TEST()
257 static_assert(std::is_same<const int&, vector_titer::reference>::value, "reference"); in TEST()
260 static_assert(std::is_same<std::random_access_iterator_tag, in TEST()
262 static_assert(std::is_same<int, vector_ctiter::value_type>::value, "value_type"); in TEST()
263 static_assert(std::is_same<const int*, vector_ctiter::pointer>::value, "pointer"); in TEST()
264 static_assert(std::is_same<const int&, vector_ctiter::reference>::value, "reference"); in TEST()
267 static_assert(std::is_same<std::random_access_iterator_tag, in TEST()
269 static_assert(std::is_same<int, vector_rtiter::value_type>::value, "value_type"); in TEST()
270 static_assert(std::is_same<const int*, vector_rtiter::pointer>::value, "pointer"); in TEST()
271 static_assert(std::is_same<const int&, vector_rtiter::reference>::value, "reference"); in TEST()
274 static_assert(std::is_same<std::random_access_iterator_tag, in TEST()
276 static_assert(std::is_same<int, vector_crtiter::value_type>::value, "value_type"); in TEST()
277 static_assert(std::is_same<const int*, vector_crtiter::pointer>::value, "pointer"); in TEST()
278 static_assert(std::is_same<const int&, vector_crtiter::reference>::value, "reference"); in TEST()
280 std::copy(MakeTransformIterator(input.begin(), ref), in TEST()
282 std::back_inserter(output)); in TEST()
283 ASSERT_EQ(std::vector<int>({ 7, 3, 1, 2, 4, 8 }), output); in TEST()
286 std::copy(MakeTransformIterator(input.cbegin(), ref), in TEST()
288 std::back_inserter(output)); in TEST()
289 ASSERT_EQ(std::vector<int>({ 7, 3, 1, 2, 4, 8 }), output); in TEST()
292 std::copy(MakeTransformIterator(input.rbegin(), ref), in TEST()
294 std::back_inserter(output)); in TEST()
295 ASSERT_EQ(std::vector<int>({ 8, 4, 2, 1, 3, 7 }), output); in TEST()
298 std::copy(MakeTransformIterator(input.crbegin(), ref), in TEST()
300 std::back_inserter(output)); in TEST()
301 ASSERT_EQ(std::vector<int>({ 8, 4, 2, 1, 3, 7 }), output); in TEST()
342 std::vector<ValueHolder> input({ 7, 3, 1, 2, 4, 8 }); in TEST()
343 std::vector<int> output; in TEST()
346 static_assert(std::is_same<std::random_access_iterator_tag, in TEST()
348 static_assert(std::is_same<int, vector_titer::value_type>::value, "value_type"); in TEST()
349 static_assert(std::is_same<int*, vector_titer::pointer>::value, "pointer"); in TEST()
350 static_assert(std::is_same<int&, vector_titer::reference>::value, "reference"); in TEST()
353 static_assert(std::is_same<std::random_access_iterator_tag, in TEST()
355 static_assert(std::is_same<int, vector_rtiter::value_type>::value, "value_type"); in TEST()
356 static_assert(std::is_same<int*, vector_rtiter::pointer>::value, "pointer"); in TEST()
357 static_assert(std::is_same<int&, vector_rtiter::reference>::value, "reference"); in TEST()
359 std::copy(MakeTransformIterator(input.begin(), ref), in TEST()
361 std::back_inserter(output)); in TEST()
362 ASSERT_EQ(std::vector<int>({ 7, 3, 1, 2, 4, 8 }), output); in TEST()
365 std::copy(MakeTransformIterator(input.rbegin(), ref), in TEST()
367 std::back_inserter(output)); in TEST()
368 ASSERT_EQ(std::vector<int>({ 8, 4, 2, 1, 3, 7 }), output); in TEST()
395 std::list<int> transform_input({ 1, -1, 2, -2, 3, -3 }); in TEST()
396 std::vector<ValueHolder> transformed(transform_input.size(), 0); in TEST()
397 std::transform(transform_input.begin(), in TEST()
401 ASSERT_EQ(std::vector<ValueHolder>({ -2, 2, -4, 4, -6, 6 }), transformed); in TEST()
410 std::vector<ValueHolder> input({ 7, 3, 1, 2, 4, 8 }); in TEST()
411 std::vector<int> output; in TEST()
414 static_assert(std::is_same<std::random_access_iterator_tag, in TEST()
416 static_assert(std::is_same<int, vector_titer::value_type>::value, "value_type"); in TEST()
417 static_assert(std::is_same<int*, vector_titer::pointer>::value, "pointer"); in TEST()
418 static_assert(std::is_same<int&, vector_titer::reference>::value, "reference"); in TEST()
421 static_assert(std::is_same<std::random_access_iterator_tag, in TEST()
424 static_assert(std::is_same<const int*, vector_ctiter::pointer>::value, "pointer"); in TEST()
425 static_assert(std::is_same<const int&, vector_ctiter::reference>::value, "reference"); in TEST()
428 static_assert(std::is_same<std::random_access_iterator_tag, in TEST()
430 static_assert(std::is_same<int, vector_rtiter::value_type>::value, "value_type"); in TEST()
431 static_assert(std::is_same<int*, vector_rtiter::pointer>::value, "pointer"); in TEST()
432 static_assert(std::is_same<int&, vector_rtiter::reference>::value, "reference"); in TEST()
435 static_assert(std::is_same<std::random_access_iterator_tag, in TEST()
438 static_assert(std::is_same<const int*, vector_crtiter::pointer>::value, "pointer"); in TEST()
439 static_assert(std::is_same<const int&, vector_crtiter::reference>::value, "reference"); in TEST()
441 std::copy(MakeTransformIterator(input.begin(), ref), in TEST()
443 std::back_inserter(output)); in TEST()
444 ASSERT_EQ(std::vector<int>({ 7, 3, 1, 2, 4, 8 }), output); in TEST()
447 std::copy(MakeTransformIterator(input.cbegin(), ref), in TEST()
449 std::back_inserter(output)); in TEST()
450 ASSERT_EQ(std::vector<int>({ 7, 3, 1, 2, 4, 8 }), output); in TEST()
453 std::copy(MakeTransformIterator(input.rbegin(), ref), in TEST()
455 std::back_inserter(output)); in TEST()
456 ASSERT_EQ(std::vector<int>({ 8, 4, 2, 1, 3, 7 }), output); in TEST()
459 std::copy(MakeTransformIterator(input.crbegin(), ref), in TEST()
461 std::back_inserter(output)); in TEST()
462 ASSERT_EQ(std::vector<int>({ 8, 4, 2, 1, 3, 7 }), output); in TEST()
503 static_assert(!std::is_same<decltype(it), decltype(cit)>::value, "Types must be different"); in TEST()
507 static_assert(!std::is_same<decltype(rit), decltype(crit)>::value, "Types must be different"); in TEST()
511 std::list<int> transform_input({ 42, 73, 11, 17 }); in TEST()
512 std::vector<ValueHolder> transformed(transform_input.size(), 0); in TEST()
513 std::transform(transform_input.begin(), in TEST()
517 ASSERT_EQ(std::vector<ValueHolder>({ -42, -73, -11, -17 }), transformed); in TEST()
522 std::vector<ValueHolder> data({ 1, 0, 1, 3, 1, 0 }); in TEST()
527 ASSERT_EQ(std::vector<ValueHolder>({ 12, 11, 12, 14, 12, 11 }), data); in TEST()