GrPPI  0.2
Generic and Reusable Parallel Pattern Interface
iterator.h
Go to the documentation of this file.
1 
21 #ifndef GRPPI_COMMON_ITERATOR_H
22 #define GRPPI_COMMON_ITERATOR_H
23 
24 namespace grppi{
25 
28 template <typename ... InputIt>
29 void advance_iterators(size_t delta, InputIt & ... in) {
30  // This hack can be done in C++14.
31  // It can be simplified in C++17 with folding expressions.
32  using type = int[];
33  type { 0, (in += delta, 0) ...};
34 }
35 
38 template <typename ... InputIt>
39 void advance_iterators(InputIt & ... in) {
40  // This hack can be done in C++14.
41  // It can be simplified in C++17 with folding expressions.
42  using type = int[];
43  type { 0, (in++, 0) ...};
44 }
45 
46 
47 }
48 
49 #endif
Definition: callable_traits.h:24
void advance_iterators(size_t delta, InputIt &...in)
Definition: iterator.h:29