Classes | Typedefs | Functions
test_bifla.cxx File Reference
#include "WireCellUtil/GeneratorIter.h"
#include <iostream>
#include <vector>

Go to the source code of this file.

Classes

struct  EveryOther< Container >
 

Typedefs

typedef std::vector< int > IntVector
 
typedef EveryOther< IntVectorEOIV
 
typedef GeneratorIter< EOIV, int > eo_iterator
 
typedef std::pair< eo_iterator, eo_iteratoreo_range
 

Functions

eo_range make_every_other (IntVector::iterator begin, IntVector::iterator end)
 
int main ()
 

Typedef Documentation

Definition at line 54 of file test_bifla.cxx.

typedef std::pair<eo_iterator, eo_iterator> eo_range

Definition at line 55 of file test_bifla.cxx.

Definition at line 53 of file test_bifla.cxx.

typedef std::vector<int> IntVector

Definition at line 52 of file test_bifla.cxx.

Function Documentation

int main ( void  )

Definition at line 63 of file test_bifla.cxx.

64 {
65  IntVector vi;
66  vi.push_back(0);
67  vi.push_back(1);
68  vi.push_back(2);
69  vi.push_back(3);
70  vi.push_back(4);
71  vi.push_back(5);
72  vi.push_back(6);
73 
74 
75  auto its = make_every_other(vi.begin(), vi.end());
76 
77  for (auto it = its.first; it != its.second; ++it) {
78  cout << *it << endl;
79  }
80  return 0;
81 }
eo_range make_every_other(IntVector::iterator begin, IntVector::iterator end)
Definition: test_bifla.cxx:57
std::vector< int > IntVector
Definition: fcldump.cxx:27
QTextStream & endl(QTextStream &s)
eo_range make_every_other ( IntVector::iterator  begin,
IntVector::iterator  end 
)

Definition at line 57 of file test_bifla.cxx.

58 {
59  return eo_range(eo_iterator(EOIV(begin, end)),
60  eo_iterator(EOIV(end, end)));
61 }
GeneratorIter< EOIV, int > eo_iterator
Definition: test_bifla.cxx:54
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
Definition: StdUtils.h:72
EveryOther< IntVector > EOIV
Definition: test_bifla.cxx:53
std::pair< eo_iterator, eo_iterator > eo_range
Definition: test_bifla.cxx:55
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:67