CMS 3D CMS Logo

Range.h
Go to the documentation of this file.
1 #ifndef FWCore_Utilities_Range_h
2 #define FWCore_Utilities_Range_h
3 
4 namespace edm {
5  /*
6  *class which implements begin() and end() to use range-based loop with
7  pairs of iterators or pointers.
8  */
9 
10  template <class T>
11  class Range {
12  public:
13  Range(T begin, T end) : begin_(begin), end_(end) {}
14 
15  T begin() const { return begin_; }
16  T end() const { return end_; }
17 
18  bool empty() const { return begin_ == end_; }
19 
20  private:
21  const T begin_;
22  const T end_;
23  };
24 }; // namespace edm
25 
26 #endif
const T end_
Definition: Range.h:22
T end() const
Definition: Range.h:16
Range(T begin, T end)
Definition: Range.h:13
HLT enums.
const T begin_
Definition: Range.h:21
T begin() const
Definition: Range.h:15
long double T
bool empty() const
Definition: Range.h:18